Q:

How do I write " inside a string? Objective C

How can I write a " inside an Objective-C string?
For example I have the 
NSString *sql= @"select * from test where name="name"";

A:

Use \". In your case it would be:
NSString *sql= @"select * from test where name=\"name\""

