-2
我在嘗試使用INSERT INTO時多次檢查過所有3條語句時都收到了一個錯誤的逗號錯誤,謝謝。ORA-00917:缺少逗號。 INSERT INTO語句
INSERT INTO staff
(staff_id, staff_name, address, d_o_b, email, phone_number, salary, hire_date, job_role, nationality, over_time, bonus, caravan_park_id)
VALUES
(1.NEXTVAL, 'Simon Gould', '17 Pearson Grove', '13/10/92', '[email protected]', 07817333245, '24000', '13/10/15', 'engineer', 'Portuguese', '10 hours', '£500', 1.nextval);
INSERT INTO staff
(staff_id, staff_name, address, d_o_b, email, phone_number, salary, hire_date, job_role, nationality, over_time, bonus, caravan_park_id)
VALUES
(2.NEXTVAL, 'Josh Dawkins', '28 Mulholland Drive', '12/09/82', '[email protected]', 07801123456, '15000', '02/05/11', 'engineer', 'English', '6 hours', '£300', 2.nextval);
INSERT INTO staff
(staff_id, staff_name, address, d_o_b, email, phone_number, salary, hire_date, job_role, nationality, over_time, bonus, caravan_park_id)
VALUES
(3.NEXTVAL, 'Michelle Arazanguiz', '75 Newport Way', '21/03/90', '[email protected]', 07323456456, '16000', '05/11/08', 'tour guide', 'Spanish', '0 hours', '£0', 3.nextval);
什麼是phone_number類型?是薪水類型字符串? –
什麼是1.nextval?這是一個序列嗎? – DavidG
我敢打賭,你還有其他問題,但是由於你似乎想對'staff_id'和'caravan_park_id'值進行硬編碼,所以你不需要'.nextval'部分。我很好奇,是什麼讓你想要首先構建價值。 – sstan