3
Reply

how can compare more than one value in sql

Gaurav Raj

Gaurav Raj

Aug 3 2017 3:49 AM
239
Like this 
select *, action='also comment', User_Id from CommentTable where Blog_Id in
(select c.Blog_Id from CommentTable c full outer join BlogTable b on b.Blog_Id=c.Blog_Id
where c.User_Id=1 and b.User_Id!=1 )
and User_Id<( select Time from commentTable where UserId=1) order by Date1 desc ,time1 desc

Answers (3)