我写了一段 sqlite3 查询如下:
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;
它不断在命令外壳中的“_”附近显示语法错误。有人可以帮我更正查询吗?谢谢~
还有一个问题,如果我想从刚刚创建的视图中进行选择,我该如何引用该列,比如 a1.char_id?