SQL 2000 分页
SELECT TOP 10 *
from HumanResources.Employee
WHERE EmployeeID NOT IN (SELECT TOP 0 EmployeeID from HumanResources.Employee ORDER BY EmployeeID desc)
ORDER BY EmployeeID desc
————————————————————
SELECT TOP 分页大小 * from 表名 where 主键 not in (select top 当前页减1*分页大小 from 表名 order by 主键)
order by 主键
相关文档:
If the SQL data type is 'timestamp', we need to use ResultSet.getBytes() to retrieve its value. If the SQL data type is 'datetime', we can use ResultSet.getTimestamp(). It is said timestamp is interanlly saved as binary data.
try {
Class.forName("com.microsoft. ......
1、启用远程连接
开始——所有程序——Microsoft SQL Server 2008——配置工具——SQL Server配置管理器
SQL Server NetWork Configuration中选择协议,"Named pipes"和"TCP/IP"都选择Enable,然后点击"TCP/IP"选属性,IP Address 选项卡,将所有的 TCP动态端口 的0全部去掉,在 ......
在很多编程语言中都有 for循环这样的东西。在数据库里面 替代他是 游标
但是游标使用起来是相当耗费资源的,今天看见一个CTE尝试了下他的用法
create table employewhere
(
id int identity(1,1),
[name] varchar(10),
[value] varchar(10),
[ttime] int
)
insert employewhere
select ......
delete 删除一张大表时空间不释放,非常慢是因为占用大量的系统资源,支持回退操作,空间还被这张表占用着。
truncate table 表名 (删除表中记录时释放表空间)
DML 语句:
表级共享锁: 对于操作一张表中的不同记录时,互不影响
行级排它锁:对于一行记录,oracle 会只允许只有一个用户对它在同一时间进行修改操作 ......
下列语句部分是Mssql语句,不可以在access中使用。
SQL分类:
DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE)
DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT)
DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)
首先,简要介绍基础语句:
1、说明:创建数据库
CREATE DATABASE data ......