随笔分类 -  TranSQL

摘要:1. 什么是 SQL?SQL 指结构化查询语言SQL 使我们有能力访问数据库SQL 是一种 ANSI 的标准计算机语言编者注:ANSI,美国国家标准化组织2. RDBMS 指的是关系型数据库管理系统。RDBMS 是 SQL 的基础,RDBMS 中的数据存储在表(tables)的数据库对象中。3. S... 阅读全文
posted @ 2015-03-16 16:10 haha~
摘要:数据库集群:将多个服务器组成一组集群,将客户端负载分发到不同服务器上,随着应用程序负载的增加,只需要将新的服务器添加到集群即可。集群的存在意义是为了保证高可用、数据安全、扩展性以及负载均衡。数据库集群的两种形式:Share-Disk架构是通过多个服务器节点共享一个存储来实现数据库集群。Share-N... 阅读全文
posted @ 2015-03-13 17:17 haha~
摘要:临时表:create table#tmpTbName( colName1intidentity(1,1), colName2nvarchar(20))insert into#tmpTbName(colName1,colName2)selectc1,c2fromc;drop table#tmpTbNa... 阅读全文
posted @ 2014-12-26 11:01 haha~
摘要:--建库if exists(select * from sysdatabases where name = 'stuDB')drop database stuDBCreate database stuDBon primary( name = 'stuDB', filename = 'E:\work\... 阅读全文
posted @ 2014-08-27 16:01 haha~
摘要:1. top分页法select top pageSize from tbwhere ID not in (select top pageSize*pageIndex from tb)select top pageSize from tbwhere ID > select Max(ID) from (... 阅读全文
posted @ 2014-08-26 15:22 haha~