0

Here is the code. I´m using MYSQL. It throws a syntax error, and i can´t find the error in this simple command.

 insert into l_mes (id_mes, desc_mes, id_anio)
        values (201601, Ene 2016, 2016), (201602, Feb 2016, 2016)
Aaron Dietz
  • 10,137
  • 1
  • 14
  • 26
  • Problem is here "Ene 2016". If that's a string literal, enclose it in single quotes, `..., 'Ene 2016', ...`. Same for "'Feb 2016". – spencer7593 Jun 19 '18 at 20:46

2 Answers2

0

You need ' ticks (single quotes) around 'strings':

insert into l_mes (id_mes, desc_mes, id_anio)
    values (201601, 'Ene 2016', 2016), 
           (201602, 'Feb 2016', 2016)
Aaron Dietz
  • 10,137
  • 1
  • 14
  • 26
0

Assuming data types here, you're missing quotes around your string values.

 insert into l_mes (id_mes, desc_mes, id_anio)
        values (201601, 'Ene 2016', 2016), (201602, 'Feb 2016', 2016)
squillman
  • 13,363
  • 3
  • 41
  • 60