MySql插入语法错误

时间:2012-02-01 23:05:17

标签: mysql

Sry但我只是不明白我的syntext中有什么问题,你能帮助我吗?

"insert into users2(id,first_name,last_name,full_name,email,password,validation_key) ('1a9a14aa-cc87-4365-ab6a-2501b4e70d06','Name','Pass','NamePass','koko@lolol.com','OYJBYZw9IW0gLbkKSTXJeKTBYcRaNw0=','054eb292-0b9f-4219-830d-fadd1a8af7ad')"

3 个答案:

答案 0 :(得分:2)

您缺少VALUES

INSERT INTO users2
            (id,
             first_name,
             last_name,
             full_name,
             email,
             password,
             validation_key)
VALUES      ('1a9a14aa-cc87-4365-ab6a-2501b4e70d06',
             'Ilya',
             'Gazman',
             'IlyaGazman',
             'koko@lolol.com',
             'OYJBYZw9IW0gLbkKSTXJeKTBYcRaNw0=',
             '054eb292-0b9f-4219-830d-fadd1a8af7ad')  

答案 1 :(得分:0)

您在值之前忘记了values

答案 2 :(得分:0)

您忘记了VALUES

INSERT INTO users2 (id, first_name, last_name, full_name, email, password, validation_key) 
VALUES ('1a9a14aa-cc87-4365-ab6a-2501b4e70d06','Name','Pass','NamePass','koko@lolol.com','OYJBYZw9IW0gLbkKSTXJeKTBYcRaNw0=','054eb292-0b9f-4219-830d-fadd1a8af7ad')