第三章:SQL 编程
来源:互联网 发布:淘宝卖家钱多久到账 编辑:程序博客网 时间:2024/06/04 23:18
--上机1 declare @name nvarchar(255) set @name='★' declare @int int set @int=1 while(@int<6) begin print @name set @name+='★' set @int+=1 end go --上机2 select studentno as '学号',StudentName as '姓名',FLOOR(DATEDIFF(dy,birthday,getdate())/365) as '年龄' from dbo.Student where studentno='23225' declare @yy int select @yy=DATEPART(YY,birthday) from student where studentno='23225' select * from student where DATEPART(YY,birthday)=@yy+1 or DATEPART(YY,birthday)=@yy-1 go --上机3 select top 1 studentname,studentresult from student,result,subject where student.studentno='23219' and subject.subjectid=2 declare @result int select @result=studentresult from student,result,subject where student.studentno='23219' and subject.subjectid=2 if(@result>85) print '优秀' else if(@result>70) print '良好' else if(@result>60) print '中等' else print '差'
0 0
- 第三章SQL编程
- 第三章:SQL 编程
- 第三章 SQL的编程
- 第三章 sql编程 练习
- SQL 高级 第三章 SQL编程
- 优化MySchool 第三章 SQL编程
- 优化MySchool SQL编程 第三章
- ORACLE SQL高级编程第三章学习笔记
- 第三章 SQL编程 课上知识点笔记
- 第三章SQL编程--经典案例和上级题
- SQL数据库编程大赛(第三期)
- SQL Server 2008编程入门经典笔记(第三章:T-SQL基本语句)
- SQL笔记 第三章
- SQL 第三章笔记
- SQL 第三章 练习
- 编程珠玑第三章
- 编程珠玑第三章
- 编程珠玑第三章
- 第五章:项目:我的租房网
- 知识库--Using Akka Refs and Transactions(124)
- 学习笔记1--协方差矩阵
- 第四章:高级查询
- WEB入门之十六 操作DOM节点
- 第三章:SQL 编程
- docker简介及使用国内镜像源安装docker
- 第二章:数据库的实现
- 开源数据库最全盘点
- bzoj 4031: [HEOI2015]小Z的房间 (矩阵树定理+高斯消元)
- 转载-面试感悟----一名3年工作经验的程序员应该具备的技能
- 最长公共子序列(LCS)
- (Java学习笔记5.2)选择排序
- 新建数据库-添加数据-添加约束