How do I combine 2 select statements into one?

后端 未结 8 2207
执念已碎
执念已碎 2020-12-23 13:23

I am a noob when it comes to SQL syntax.

I have a table with lots of rows and columns of course :P Lets say it looks like this:

      AAA BBB CCC DD         


        
8条回答
  •  臣服心动
    2020-12-23 14:04

    select t1.* from 
    (select * from TABLE Where CCC='D' AND DDD='X') as t1,
    (select * from TABLE Where CCC<>'D' AND DDD='X') as t2
    

    Another way to do this!

提交回复
热议问题