SQL
跳转到导航
跳转到搜索
範例
這邊的範例是MySQL用的。
CREATE TABLE users (
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
created_at INT UNSIGNED NOT NULL,
updated_at INT UNSIGNED NOT NULL
);
CREATE UNIQUE INDEX idx_username ON users (username);
CREATE INDEX idx_email ON users (email);