Home > database >  Oracle SQL statements
Oracle SQL statements

Time:10-09

Please have a look at the SQL, where is wrong? ORA - 00936: lack expression
SELECT ROWNUM RN, * FROM (SELECT m.I D, m.M NO, m.N AME, m.N OTES, sum (s.G NUM) as GNUM
FROM MATERIAL m left join STOCK s on m.M NO=s.G CODE where 1=1
GROUP BY m.I D, m.M NO, m.N AME, m.N OTES) A;
The inside of the parentheses subquery is correct, the SQL statements do not know whether can perform successfully on the SQL server and mysql, don't try! If can execute SQL server and mysql success in, in terms of the SQL, Oracle and what is the difference between a mysql or SQL server?

CodePudding user response:

SELECT ROWNUM RN, *
SELECT ROWNUM RN, a. *

CodePudding user response:

SELECT ROWNUM RN, a. * FROM (SELECT m.I D, m.M NO, m.N AME, m.N OTES, sum (s.G NUM) as GNUM
FROM MATERIAL m left join STOCK s on m.M NO=s.G CODE where 1=1
GROUP BY m.I D, m.M NO, m.N AME, m.N OTES) A;
  • Related