SQL语句
十五画
这个作者很懒,什么都没留下…
展开
-
SQL语句汇总
-- 创建三张表张表模拟银行存钱取钱,用户信息 -- 账户信息 create table t_user(account_id VARCHAR(32) PRIMARY KEY not null,username varchar(32) not null, sex char(2) not null, age int not null) -- 余额表 create table account(account_id varchar(32) not null,money DECIMAL(10,2) not nul.原创 2021-06-30 21:15:36 · 202 阅读 · 0 评论 -
SQL常用语句
lter table t_user ADD id_num VARCHAR(255) not null select *from t_user select *from thing alter table thing MODIFY thing_id int AUTO_INCREMENT alter table thing add CONSTRAINT f1 FOREIGN KEY(id_num) REFERENCES t_user(id_num) alter table t_user MODIF.原创 2021-06-28 14:04:13 · 99 阅读 · 0 评论 -
SQL基本命令
-- 创建teacher表 create table teacher (t_id VARCHAR(32) NOT NULL,t_name varchar(32) not null,t_sex VARCHAR(32) not null,t_age int not null,t_subject VARCHAR(32) not null) -- 添加主键 alter table teacher add PRIMARY key (t_id) -- 创建student表 create table studen...原创 2021-06-22 22:32:36 · 111 阅读 · 0 评论