简体   繁体   中英

Using Where statement on comma seperated value in sqlite

I have sqlite database with table containing comma seperated fields like that:

Data Field containing:

Frank; 34 California street; 0123456789

FieldData Field containing:

Name; Address; Phone number

I want to make where query on only one data. For example:

Select * From Persons Where Name = 'Frank';

Please help!

but your model performance will be very bad! if you have to you can do something like this :

  Select * From Persons Where substr(field,1,instr(field,';')-1) = 'Frank';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM