SQL Server JDBC Deriver Problems
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.sqlserver.jdbc.SQLServerDriver");
Connection conn = DriverManager.getConnection
("jdbc:sqlserver://<url_address>;user=<user>;password=<password>;database=<database>");
Statement statement = conn.createStatement
(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = statement.executeQuery("...");
while (rs.next()) {
System.out.println(rs.getTimestamp(1));
}
} catch (Exception e) {
e.printStackTrace();
}
相关文档:
SQL Server的性能主要取决于磁盘I/O效率,提高I/O效率某种程序上就意味着提高性能。SQL Server 2008提供了数据压缩功能来提高磁盘I/O。
数据压缩意味着减小数据的有磁盘占用量,所以数据压缩可以用在表,聚集索引,非聚集索引,视图索引或是分区表,分区索引上。
数据压缩可以在两个级别上实现:行级别和页级别。页级别压 ......
熟练使用SQL Server中的各种用法会给查询带来很多方便。今天就介绍一下EXCEPT和INTERSECT。注意此语法仅在SQL Server 2005及以上版本支持。
EXCEPT是指在第一个集合中存在,但是不存在于第二个集合中的数据。
INTERSECT是指在两个集合中都存在的数据。
测试如下:
create table t1(id int,mark char(2))
go
create ta ......
开放性 SQL Server
只能在Windows 上运行,没有丝毫的开放性,操作系统的系统的稳定对数据库是十分重要的。Windows9X系列产品是偏重于桌面应用,NT server只适合中小型企业。而且Windows平台的可靠性,安全性和伸缩性是非常有限的。它不象Unix那样久经考验,尤其是在处理大数据量的关键业务时。
Oracle
......
在Asp.net后有很多常用的表结构 membership就是一个典型,除此还有code表
CREATE TABLE [dbo].[CodeTables](
[CodeTableID] [uniqueidentifier] NOT NULL,
[ParentCodeTableID] [uniqueidentifier] NULL,
[Name] [varchar](200) COLLATE SQL_Latin1_General_ ......