Reputation: 878
I am wrapping my SQL statement for FMDatabase in a NSString. I'd like to keep it clean with line returns like
SELECT * FROM table as t
JOIN location as loc
on t.position = loc.value
Is there a way to wrap a long SQL statement (the actual statement is much longer) in an NSString with line breaks? I'd rather not create a NSMutableString, and then appendFormat:. Thanks.
Upvotes: 0
Views: 231
Reputation: 29767
NSString *query = @"SELECT * FROM table as t \
JOIN location as loc \
on t.position = loc.value";
Upvotes: 1
Reputation: 104065
This should work:
NSString *statement =
@"line1\n"
"line2\n"
"line3\n";
Upvotes: 1