Gaurav Raj

Gaurav Raj

  • NA
  • 475
  • 88.6k

how can compare more than one value in sql

Aug 3 2017 3:49 AM
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)