标签:ack 部分 ble into null sql基础 char 数据 color
create table 表名 (
列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;
标签:ack 部分 ble into null sql基础 char 数据 color
原文地址:https://www.cnblogs.com/sujw/p/12711907.html