标签:
create database s9999--注释数据库
create table student--创建一个表
(
code int not null,
name varchar(50) not null,
sex varchar(50) not null,
age int not null
)
go
insert into student values(1,‘张三‘,‘男‘,20);--插入表的信息
insert into student values(2,‘李四‘,‘男‘,22);
insert into student values(1,‘王五‘,‘女‘,30);
go
select*from student
update student set name=‘天天‘ where name=‘李四‘--吧表里李四的名字改成天天
delete from student where code=2--吧表里的学号为2的同学删除
select*from student where name like ‘%三‘--寻找表里所有名字带三的同学
标签:
原文地址:http://www.cnblogs.com/w-wz/p/4438671.html