- 博客(6)
- 收藏
- 关注
原创 插入更新删除数据
插入数据insert into mytable (id,name,age) values (1,xxiang,23)从别的表中数据插入到mytable中insert into my(id,name,age)select id,name,age from othertable从别的表中数据插入到新的表中,新表未创建(就是数据库中没有这个表)select Id,name,age insert
2007-02-09 15:10:00 561
原创 高极检索技术
聚合技术select 表中的数据量=Count(*),表中的不为空的数据量=Count(num1) from pvcount(*)为所有数据(包括空值)count(num1)去掉空值后所有数据这个只显示聚合值Compute子句中的聚合compute子句两种形式一种是不带by子句,一种是带by子句select * from pv //明细值compute sum(num1) //聚合值
2007-02-09 15:09:00 516
原创 基本检索技术
select子句select id,name from xxiangid,name为列名,xxiang为表名使用文字串select the number of,id from xxiang 要显示单引号,要在中间要加两个select the number of",id from xxiang 要显示双引号,要在中间要加两个"显示结果: 无列名 idthe
2007-01-31 19:34:00 581
原创 创建表
创建标准表create table productSales(ID int identity(1,1) not null,nid uniqueidentifier default NewID(), //Rowguidcol的使用productName varchar(20) not null,unitPrice decimal(10,2) not null,qty int not null,am
2007-01-31 19:33:00 782
原创 创建数据库
具有create database、create any database、alter any database权限的用户才可以创建数据库。创建数据库Create database xxiang2007on primary(name = xxiang2007,filename=D:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/DATA/xxi
2007-01-29 20:05:00 568
原创 sql2005安全管理
先创建登录名,可以是windows登录名也可以sql登录名windows登录名是windows操作系统已经存在的用户名sql登录名要在sql中创建而得的要创建windows登录名:例如:已经在windows中存在一个pkxz用户,域名是xxiangcreate login [xxiang/pkxz] from windows with default_database = cssalter lo
2007-01-27 15:45:00 1455
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人