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)

ORA-00913: too many values

ORA-00913: too many values ORA-00913: too many values Cause: The SQL statement requires two sets of values equal in number. Solution: Check the number of items in each set and change the SQL statement to make them equal. Example: SELECT * FROM COURSE c WHERE c.COURSE_ID IN (SELECT o.* FROM ORDERS o); Output: ORA-00913: too…(Continue Reading)

PLS-00215: String length constraints must be in range

PLS-00215: String length constraints must be in range (1 .. 32767) PLS-00215: String length constraints must be in range (1 .. 32767) Cause: When a character variable was declared, a length outside the legal range was specified. Solution: Change the length constraint, making sure that it lies in the range 1 .. 32767. Example: declare…(Continue Reading)

ORA-06553: PLS-306: wrong number or types of arguments in call

ORA-06553: PLS-306: wrong number or types of arguments in call to ORA-06553: PLS-306: wrong number or types of arguments in call to Cause: An Oracle function was referenced with an incorrect number of arguments. Solution: Correct the syntax of the function by entering the required number of arguments. Example: create or replace function TEST(p_id number)…(Continue Reading)