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

各种数据库sql语句取表中n m条数据

命题:写出一条Sql语句: 取出表A中第31到第40记录(自动增长的ID作为主键,  注意:ID可能不是连续的。)
oracle数据库中:
1、select * from A where rownum<=40 minus select * from A where rownum<=30
sqlserver数据库中:
1、select top 10 * from A where id not in (select top 30 id from A )
2、select top 10 * from A where id>(select max(id) from (select top 30 id A) as A)
mysql数据库中:
SELECT * from A LIMIT 30,40


相关文档:

航空公司管理系统(VC++ 与SQL 2005)

系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
      这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......

【复习】SQL 内,外,左,右连接

信息表(infor)工资表(pay)
内连接
select pay.name,infor.AGE,PAY.MONEY,infor.email from pay  join infor on infor.name=PAY.name
左外连接
select pay.name,infor.AGE,PAY.MONEY,infor.email from pay  left join infor on infor.name=PAY.name
PS:结果有王五,工资为0
右外连接
select pay.name,info ......

SQL SERVER快捷键

                                                   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号