摘要: use testgo--select * from stu2drop table stu2--删除表gocreate table stu2 --新建一个名为stu2表( id int primary key, name char(20) not null, sex char(10) not null... 阅读全文
posted @ 2015-08-16 22:31 WhyToHow 阅读(323) 评论(0) 推荐(1) 编辑
摘要: use test --操作test表go--查询select * from stu -- 查询stu里的所有数据select top 3 * from stu -- 查询stu里前三行数据select top 3 * from stu where age = 45 --查询stu里指定条件的前三行数... 阅读全文
posted @ 2015-08-16 21:14 WhyToHow 阅读(250) 评论(0) 推荐(1) 编辑
摘要: 分类字段类型描述整数bit0或1的整型数字int从-2^31(-2,147,483,648)到2^31-1(2,147,483,647)的整型数字smallint从-2^15(-32,768)到2^15-1(32,767)的整型数字tinyint从0到255的整型数字精确小数decimal(p... 阅读全文
posted @ 2015-08-16 18:43 WhyToHow 阅读(944) 评论(0) 推荐(1) 编辑
摘要: use masterif db_id ('test') is not null--判断test数据库是否存在 drop database [test]--如果存在 删除testgo--完成查找删除工作/*****创建一个数据库****/create database [test]--创建数据库tes... 阅读全文
posted @ 2015-08-16 17:51 WhyToHow 阅读(523) 评论(0) 推荐(0) 编辑
摘要: GO1. 作用:向 SQL Server 实用工具发出一批 Transact-SQL 语句结束的信号.2. 语法:一批 Transact-SQL 语句 GO 如 Select 1 Select 2 Select 3 GO3. 说明:1) GO 不是 Transact-SQL 语句;2) 它是 sql... 阅读全文
posted @ 2015-08-16 17:46 WhyToHow 阅读(1068) 评论(0) 推荐(0) 编辑
摘要: 关系数据库和非关系数据库的区别是,关系数据库只有“表”这一种数据结构;而非关系数据库系统还有其他数据结构,对这些数据结构还有其他操作。随着网络的不断发展,单纯关系数据库面临挑战。关系与非关系型数据库的特点1.关系型数据库关系型数据库,是指采用了关系模型来组织数据的数据库。简单来说,关系模型指的就是二... 阅读全文
posted @ 2015-08-16 09:40 WhyToHow 阅读(259) 评论(0) 推荐(0) 编辑