ORA-00936: missing expression ORA-00936: missing expression Cause: A required part of a clause or expression has been omitted. Solution: Check the statement syntax and specify the missing component. Example: SELECT FROM COURSE; SELECT * FROM COURSE WHERE ; Output: ORA-00936: missing expression Correct SELECT * FROM COURSE; SELECT * FROM COURSE WHERE PRICE=10;
Author: Dev
ORA-00918: column ambiguously defined
ORA-00918: column ambiguously defined ORA-00918: column ambiguously defined Cause: A column name used in a join exists in more than one table and is thus referenced ambiguously. Solution: Prefix references to column names that exist in multiple tables with either the table name or a table alias. Example: SELECT COURSE_ID, COURSE_ID FROM ORDERS, COURSE WHERE…(Continue Reading)
ORA-00933: SQL command not properly ended
ORA-00933: SQL command not properly ended ORA-00933: SQL command not properly ended Cause: The SQL statement ends with an inappropriate clause. Solution: Correct the syntax by removing the inappropriate clauses. Example: declare v_sql varchar2(4000):=’Insert into BOOKS (ID,NAME,PRICE) values ‘; v_string varchar2(32000); v_id number:=5; v_name varchar2(200):=’SQL Tutorial’; v_price number:=14; begin v_string:=v_sql||'(‘||v_id||’,”||v_name||”,’||v_price||’);’; DBMS_OUTPUT.PUT_LINE(v_string); execute immediate v_string; end;…(Continue Reading)
ORA-00917: missing comma
ORA-00917: missing comma ORA-00917: missing comma Cause: A required comma has been omitted from a list of columns or values in an INSERT statement. Solution: Correct the syntax. Example: declare v_sql varchar2(4000):=’Insert into BOOKS (ID,NAME,PRICE) values ‘; v_string varchar2(32000); i number:=3; v_id number:=5; v_name varchar2(200):=’MySQL Tutorial’; v_price number:=23; begin for i in 1..3 loop v_string:=v_sql||'(‘||v_id||’,’||v_name||v_price||’);’;…(Continue Reading)
ORA-00926: missing VALUES keyword
ORA-00926: missing VALUES keyword ORA-00926: missing VALUES keyword Cause: An INSERT statement has been entered without the keyword VALUES or SELECT. Solution: Correct the syntax. Enter either a VALUES clause or a subquery after the INSERT INTO clause. Example: Insert into BOOKS (ID,NAME,PRICE) val (2,’MySQL Tutorial’,32); Output: ORA-00926: missing VALUES keyword Correct Insert into BOOKS…(Continue Reading)