dimanche 24 avril 2016

no such column error in sqlite3

I'm trying trying to insert values into my table, but am getting a no such column error. I was searching and saw that in most cases it was because they were missing quotation marks, but I seem to have them. Can anyone point me in the right direction?

CREATE TABLE students (
id INTEGER PRIMARY KEY,
first_name VARCHAR(255),
last_name VARCHAR(255),
grade INT,
passing BOOLEAN,
teacher_id INT,
FOREIGN KEY (teacher_id) REFERENCES teachers(id)
);

INSERT INTO students (first_name, last_name, grade, passing, teacher_id) 
VALUES (‘Ted’, ‘Mosby’, 84, true, 2);

Error: no such column: ‘Ted’

Aucun commentaire:

Enregistrer un commentaire