【SQL开源代码栏目提醒】:网学会员在SQL开源代码频道为大家收集整理了003.sql提供大家参考,希望对大家有所帮助!
use db_Sql
GO
if exists(select * from INFORMATION_SCHEMA.TABLES
where table_name = 'tb_student01')
drop table tb_student01
GO
--创建学生信息表“tb_student01”
create table tb_student01
(
学生编号 int identity(1001,1),
学生 varchar(30),
学生成绩 float
)
GO
--向该信息表中插入几条数据
insert into tb_student01 values('石莹','91')
insert into tb_student01 values('李心','95')
insert into tb_student01 values('张梅','88')
insert into tb_student01 values('车丽','89')
insert into tb_student01 values('李理','100')
GO
select *
from tb_student01
where 学生编号>1003 --从学生表里查询,
查询学生编号大于1003的学生的信息