mysql建表語句

2021-09-03 02:43:30 字數 873 閱讀 5496

create table `who_csjcm_transfer_jollycall_data` (

`rec_id` int(11) unsigned not null auto_increment comment '唯一自增主鍵',

`user_id` int(11) not null default '0' comment '使用者id',

`user_level` tinyint(2) not null default '0' comment '使用者級別',

`task_type` tinyint(2) not null default '0' comment '型別',

`phone` varchar(64) not null default '' comment '撥打號碼',

`language` int(11) not null default '0' comment '語言',

`site` int(11) not null default '0' comment '站點',

`country` int(11) not null default '0' comment '國家',

`order_ids` varchar(255) not null default '' comment '訂單id串,逗號分隔',

`order_nos` varchar(255) not null default '' comment '訂單號串,逗號分隔',

`add_time` int(11) not null default '0' comment '新增時間',

primary key (`rec_id`)

) engine=innodb default charset=utf8 comment='外呼資料傳輸記錄表';

mysql建表語句

在sql語句中注意 約束的概念 1.實體完整性約束 主鍵 唯一且非空 primary key 違約處理 no action 拒絕執行 2.參照完整性約束 外來鍵約束 foregin key references tablename filedname on delete update casecad...

mysql建表語句

mysql裝好以後,進入命令列,開始建表需要先建立乙個database.開始使用 create database mybase use mybase create table user id int 10 auto increment not null primary key,username va...

mysql建表語句

工作的時候總會寫一些建表語句提交給db,有的時候就會忘記主鍵自增寫法,以及一些型別的標註,下面是乙個比較全的建表語句,包括各種型別。create table minisite lock site id int not null auto increment primary key,admin id ...