If column value is in 1,2,34,23,44,444,12,23,... format than how can check the value using like operator in Sql. means if the coma separated value is in column in any table then how can check the value using like operator in Sql.
solution:
select * from s
where
sid like '44,%' or sid like '%,44,%'
or sid like '%,44' or sid='44'
where sid is column name
this will only return the 44
Friday, September 19, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment