I haven't done much on databases ever but I am now required to do so for University. I have built a schema which can be found below and also made a data.sql file to inset so data. I'm getting the error "Error: near line 1: Near NULL: Syntax error", but I can't see what the issue is, I know it will be something simple which I have done wrong but I would appreciate the help. Thank you.
Schema.sql
DROP TABLE users;
CREATE TABLE users(id integer primary key, username varchar(30), password varchar(30), email varchar(50), receive_email blob, gender varchar(6));
DROP TABLE lists;
CREATE TABLE lists(id integer primary key, user_id integer, list_id integer, name varchar(50), creation_date datetime, importance integer, completed blob);
DROP TABLE list_item;
CREATE TABLE list_item(id integer primary key, list_id integer, name varchar(50), creation_date datetime, completed blob);
data.sql
INSERT INTO users(NULL, "kieran", "password", "kmplavelle@gmail.com", "1", "male");
INSERT INTO users(NULL, "test", "testpassword", "test_email", "0", "female");
Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire