SQLite 创建表

CREATE TABLE 定义列与约束;.tables 与 .schema 验证。

Beginner
Key PointsSQLite,CREATE TABLE,建表

讲解

CREATE TABLE 定义列与约束;.tables 与 .schema 验证。

示例

SQL
CREATE TABLE company (
  id   INTEGER PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL,
  age  INT,
  country CHAR(2)
);
.tables
Output
company

Friends & Partners