本文为iihero原创,如若转载,请注明出处。谢谢。 为简化问题:设表:t(id int, col2 varchar(32)) 1. ASE: 选出重复的行:select * from t group by id, col2 having count(*)>1删掉重复的行,alter table t add col3 int identity not null;delete from t where col...【阅读全文】
NULL,表示不明确、未知的列值 测试表:testnull(id varchar(32))数据库:Sybase ASA11.0行数据(''), (NULL) 数据库选项ansinull为true(也是ASA数据库的默认选项)时,select * from testnull where id = nullselect * from testnull where id != null结果均为空select...【阅读全文】
使用pl/sql读取写入blob对象一、写文件到BLOBSQL> create table iihero_blob(fid int primary key, fname varchar(32), f blob);表已创建。SQL> conn / as sysdba已连接。SQL> create or replace directory BLOB...【阅读全文】
Oracle数据库当中,关于日志与回滚那一部分,与别的数据库确实有很大的不同。为了避免在写日志的同时后台进程对日志文件的读操作,Oracle使用了单独的回滚段来记录“旧”的数据。这样可以达到并行读写的目的,整体I/O效率提高了不少,但也引入了一些问题。最经典的莫过于ORA-01555:snapshot too old错误了。1.什么操作产...【阅读全文】