SQLite - Run multi-line SQL script from file?

后端 未结 4 717
盖世英雄少女心
盖世英雄少女心 2021-02-01 12:49

I have the following SQL in a file, user.sql:

CREATE TABLE user
(
  user_id INTEGER PRIMARY KEY,
  username varchar(255),
  password varchar(255)
);
4条回答
  •  自闭症患者
    2021-02-01 13:43

    I had exactly the same problem.

    Then I noticed, my editor (Notepad++) reports Macintosh format for end of lines.

    Converting eols into Unix style turned the script file into format, which sqlite3 understood.

提交回复
热议问题