时间:2021-07-01 10:21:17 帮助过:6人阅读
列1 类型1 约束1,
列2 类型2 约束2,
列3 类型3
);
例如:
create table student(
id int primary key,
name varchar(20) not null,
sex char(1)
);
a.全量插入
insert into 表名 values (列1值,列2值,列3值);
eg:insert into student values (1,‘张三‘,‘男‘);
b.部分插入(插入指定列)
insert into 表名 (列1,列2) values (列1值,列2值);
eg:insert into student (id,name) values (1,‘张三‘);
update 表名 set 列=值 where 条件;
eg:update student name=‘李四‘ where id=1;
select 列/* from 表名 where 条件;
eg:select * from student;
delete from 表名 where 条件;
eg:delete from student where id=1;
mysql基础---DOS下创建表(增删改查)
标签:ack 部分 ble into null sql基础 char 数据 color