使用代码对数据库进行操作

select *from car --select选中映射 *所有的 from 去哪个表查

create database xuankeDate 创建数据库
go 连接符
-- 注释一行
use xuankedate 使用数据库
go
create table student 创建表格
(
cade Int not null,列名,类型,是否为空
name varchar(20), 什么类型
sex int,
height decimal(18,2)
)
go
insert into student values(1,'李四',1.85) 添加数据
go
select *from student 查询
go
drop table student 删除表
go
drop database student 删除数据库
go

posted @ 2015-11-05 18:03  默认lz  阅读(176)  评论(0编辑  收藏  举报