TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mangesh santharam
1.2k
241
7k
MySQL query finding values in a comma separated string
Sep 1 2018 10:14 AM
I have a field coursecode (varchar(50)) in a my table pcp that contains a comma delimited string such as .1,2,5,12, 15 Each number representing the available courses. When running the query select * from pcp where coursecode like '%1%' to get all the coursecode (coursecode=1), I also get the course who's code is xyz (=12) and abc(=15). How should I rewrite the query so that is selects ONLY the coursecode 1 and not all coursecode containing the number 1?
Reply
Answers (
1
)
Retrieve only second week of the month data?
What is difference between #Temp and ##Temp in Sql Server