I wrote a piece of sqlite3 query as following:
CREATE TABLE appearances(
char_id int,
comic_id int
);
CREATE VIEW co-actors AS
SELECT a1.char_id,
a2.char_id
FROM appearances AS a1
LEFT JOIN appearances AS a2 ON a1.comic_id=a2.comic_id;
And it keeps showing up syntax error near ‘_’ in the command shell.
Can anybody help me correct the query? Thanks~
One more question, if I want to select from the View I just created, how do I reference the column,like a1.char_id?
Change
co-actorstoco_actorsYou are using a
-where you should be using a_.