IOS - Objective C - SQLite Query.
I want records from user table which is name start with a special character or digit or else (Not start with alphabet a-z or A-Z).
If i have tried like following query then i got a result which is name start with 'a'.
char ch = 'a';
NSLog(@"%@",[db writeQuery:[NSString stringWithFormat:@"SELECT * from user where first_name like '%c%%'",ch]]);
If have tried following query, But got app crash.
NSLog(@"%@",[db writeQuery:[NSString stringWithFormat:@"SELECT * from user where first_name REGEXP '^[^a-zA-Z]'"]]);
Got error like follow.
SQLite Prepare Failed: no such function: REGEXP
- Query: SELECT * from user where first_name REGEXP '^[^a-zA-Z]'