numbers - SQL Select where id is in `column` -


i have column has multiple numbers separated comma. example row:

`numbers`:  1,2,6,66,4,9 

i want make query select row if number 6 (for example) in column numbers.

i cant use like because if there 66 , want select row if number 6 exists, it'll work too.

thanks, and sorry english

you can use like. concatenate field separators @ beginning , end of list , use like. here sql server sytnax:

where ','+numbers+',' '%,'+'6'+',%' 

sql server uses + string concatenation. other databases use || or concat() function.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -