Sepph Posted February 1, 2010 Share Posted February 1, 2010 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 More sharing options...
corbin Posted February 3, 2010 Share Posted February 3, 2010 Order shouldn't matter. Link to comment https://forums.phpfreaks.com/topic/190518-comparing-a-subquery-with-a-constant/#findComment-1005851 Share on other sites More sharing options...
Sepph Posted March 6, 2010 Author Share Posted March 6, 2010 I've been going through the Oracle Database Programmer Course and it does mention subqueries must be on the right side of a comparison. Maybe this rule applies to Oracle only? Link to comment https://forums.phpfreaks.com/topic/190518-comparing-a-subquery-with-a-constant/#findComment-1022319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.