易截截图软件、单文件、免安装、纯绿色、仅160KB

sqlserver 上机练习题

 create database db
use db
go
create table course
(
 sno varchar(20),
 cno int ,
 Gmark int
)
insert into course values('20071513115',1,80)
insert into course values('20071513114',2,80)
insert into course values('20071513113',3,80)
insert into course values('20071513112',4,80)
insert into course values('20071513111',1,80)
insert into course values('20071513110',2,80)
insert into course values('20071513116',3,80)
insert into course values('20071513117',1,80)
select  distinct cno from course
go
create table student
(sno char(7) not null primary key,
 sname varchar(20) not null,
 ssex char(2) not null,
 sage smalldatetime ,
 spno char(5),
 classid char(5),
 Inyear char(4) not null )
insert into student
values('2000101','李勇','男','1980-7-1','00311','10497','1999')
insert into student
values('2000102','刘诗晨','女','1981-8-12','00311','10498','1999')
insert into student
values('2000103','王一鸣','男','1982-12-20','00312','10497','2001')
insert into student
values('2000104','张婷婷','女','1985-5-9','00312','10498','2000')
insert into student
values('2001101','李敏','女','1989-3-9','01311','10497','1999')
insert into student
values('2001102','贾向男','女','1982-9-3','01311','10498','2000')
insert into student
values('2001103','陈李宝','男','1981-5-7','01311','10497','1999')
insert into student
values('2000105','张三','男','1984-6-7','01311','10497','1999')
insert into student
values('2000106','张','男','1984-6-7','01311','10497','1999')
select * from student where spno='01311' and  ssex='女'
go
select sname,ssex,sage from student where spno in('01311','01312')
go
select * from student where  sname like '李%'
go


相关文档:

SqlServer 大型数据处理与优化

一、数据库结构的设计
    如果不能设计一个合理的数据库模型,不仅会增加客户端和服务器段程序的编程和维护的难度,而且将会影响系统实际运行的性能。所以,在一个系统开始实施之前,完备的数据库模型的设计是必须的。
    在一个系统分析、设计阶段,因为数据量较小,负荷较低。我们往往 ......

ORACLE临时表和SQLSERVER临时表异同

 SQL SERVER临时表
也可以创建临时表。临时表与永久表相似,但临时表存储在 tempdb 中,当不再使用时会自动删除。
有本地和全局两种类型的临时表,二者在名称、可见性和可用性上均不相同。本地临时表的名称以单个数字符号 (#) 打头;
它们仅对当前的用户连接是可见的;当用户从 Microsoft? SQL Server? 2000 实例断 ......

C#读取sqlserver 动画flash swf 文件到本地硬盘

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlC ......

SqlServer中查询10到20条之间的数据

 查询northwind数据库中orders中的10到20条记录
select   top   10   *   from   orders
 where   orderid > ( select  max(orderid)  from  (select top 10 orderid  from  orders order by orderid) as t&nbs ......

用SQL语句得到SQLServer 的表中的列的描述值

 select   case   when   c.colid=1   then   object_name(c.id)   else   ''   end   as   表名    
  ,c.name   as   字段名  
  ,t.name   数据类型  
  ,c.prec   as   长度   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号