Home > Net >  What should I do? what is wrong ? error ("missing VALUES keyword") [duplicate]
What should I do? what is wrong ? error ("missing VALUES keyword") [duplicate]

Time:09-28

INSERT INTO T_RECEITA_MEDICAMENTO (cd_receita, cd_medicamento, posologia)
INSERT INTO T_RECEITA_MEDICAMENTO VALUES (1, 2, '2x ao dia');
INSERT INTO T_RECEITA_MEDICAMENTO VALUES (2, 1, '6x ao dia');
INSERT INTO T_RECEITA_MEDICAMENTO VALUES (3, 3, '1 comprimido a cada 12 horas');
INSERT INTO T_RECEITA_MEDICAMENTO VALUES (2, 1, 'Cloridrato de Metformina');

ORA-00926: missing VALUES keyword. What is wrong

CodePudding user response:

You are missing Values keyword in first Insert statement:

INSERT INTO T_RECEITA_MEDICAMENTO (cd_receita, cd_medicamento, posologia)

CodePudding user response:

You need to remove each insert into, excluding the first line

Syntax:

Insert into my_table_name (column1,column2)
Values ('var1', 'var2);
  •  Tags:  
  • sql
  • Related