123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- CREATE DATABASE Coffee DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
- CREATE TABLE IF NOT EXISTS user (
- userID int(11) NOT NULL AUTO_INCREMENT,
- datetime TIMESTAMP NOT NULL DEFAULT current_timestamp() COMMENT '紀錄時間',
- firstname varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '姓氏',
- lastname varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名字',
- mail varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '電子郵件',
- phone varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '連絡電話',
- username varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '使用者名稱',
- password varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密碼',
- status int(11) NOT NULL COMMENT '0:admin;1:superuser;2:enduser;8:new;9:disable',
- PRIMARY KEY(userID)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
- INSERT INTO user (firstname, lastname, mail, phone, username, password, status) VALUES
- ('firstname', 'lastname', 'aaa@gmail.com', '0987654321', 'user', '123456', 1);
-
|