create table jskb(
编号 int identity(1,1) primary key not null,
姓名 varchar(20) not null,
性别 char(1) not null ,
授课名 varchar(10) not null,
教室号 int(10)
)
错哪呢?
create table jskb(
编号 int identity(1,1) primary key not null,
姓名 varchar(20) not null,
......
# Student(S#,Sname,Sage,Ssex) 学生表
# Course(C#,Cname,T#) 课程表
# SC(S#,C#,score) 成绩表
# Teacher(T#,Tname) 教师表
求一sql:
把“SC”表中“叶平”老师教的课的成绩都更改为此课程的平均成绩;
2.
查询和“1002”号的 ......
删除northwind所有表中所有的数据
SQL code:
--删除当前数据库所有表中的数据
sp_MSforeachtable 'Delete from ?'
sp_MSforeachtable @command1="Delete from ? "
sp_MSforeachtable 'Truncate Table ?'
http://blog.csdn.net/feixianxxx/archive/2009/08/16/4451842.aspx
参考我博客体会 sp_MSfor ......
[code=select a.fyear,b.fname,sum(a.fendbal) as fendbal,
'1月'=case when fperiod=1 then sum(a.fendbal) else 0 end ,
'2月'=case when fperiod=2 then sum(a.fendbal) else 0 end ,
'3月'=case when fperiod=3 then sum(a.fendbal) else 0 end ,
'4月'=case when fperiod ......
大家好sql语句中的既又问题怎么处理啊,比如查询既选择了数据库又选择了操作系统的学生姓名
是分别查询然后合并吗?
End_rbody_60302787//-->
该回复于2009-10-10 11:14:51被版主删除
对我有用[0]
丢个板砖[0]
引用
举报
管理
TOP
uqjeaxts
(uqjeaxts)
......
Table bidrank(vendorcode char(10),price money,submittime datetime,rank int)是一个用来保存供应商报价资料的表,
其中vendorcode:是供应商代码
price:为报价
rank:为供应商报价排名
问题:下面是用T-sql语言给供应商加上排名的程序。
排名规则为:名次按报价从大到小排列,如果价格相同,则按时间 ......