File "<ipython-input-16-fbff936e9c99>", line 37
sql_create_projects_table = CREATE TABLE IF NOT EXISTS ACTOR {
^
SyntaxError: invalid syntax
when I write:
sql_create_projects_table = CREATE TABLE IF NOT EXISTS ACTOR {
aid integer PRIMARY KEY,
fname text NOT NULL,
lname text NOT NULL,
gender text NOT NULL
};
sql_create_tasks_table = CREATE TABLE IF NOT EXISTS ACTOR {
aid integer PRIMARY KEY,
fname text NOT NULL,
priority integer,
"status_id integer NOT NULL,
"project_id integer NOT NULL,
lname text NOT NULL,
gender text NOT NULL
"FOREIGN KEY (project_id) REFERENCES projects (id)
};
What I have tried:
I have tried a lot to correct this error
When I write:
sql_create_projects_table = """CREATE TABLE IF NOT EXISTS ACTOR {
aid integer PRIMARY KEY,
fname text NOT NULL,
lname text NOT NULL,
gender text NOT NULL
};"""
sql_create_tasks_table = """CREATE TABLE IF NOT EXISTS ACTOR {
aid integer PRIMARY KEY,
fname text NOT NULL,
priority integer,
"status_id integer NOT NULL,
"project_id integer NOT NULL,
lname text NOT NULL,
gender text NOT NULL
"FOREIGN KEY (project_id) REFERENCES projects (id)
};"""
everything remains fine but """ means comments and no table generated in the db file.