Jump to content

Comparing a subquery with a constant


Sepph

Recommended Posts

Hi, is it corrent to write

 

(<subquery here>) <op> <constant>?

 

I.e. WHERE (SELECT COUNT(*) FROM Employees) > 10 <- WRONG?

 

I have read this is wrong and only <constant> <op> (<subquery>) works

 

I.e.  10 < WHERE (SELECT COUNT(*) FROM Employees)

 

Is there a difference between MSSQL and MySQL related to this?

Link to comment
https://forums.phpfreaks.com/topic/190518-comparing-a-subquery-with-a-constant/
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.