随笔分类 - oracle
摘要:快速向表中插入大量数据Oracle中append与Nologging 2017-05-05 / VIEWS: 304 来源于:http://blog.sina.com.cn/s/blog_61cd89f60102e7gi.html 当需要对一个非常大的表INSERT的时候,会消耗非常多的资源,因为u
阅读全文
摘要:No, TRUNCATE is all or nothing. You can do a DELETE FROM <table> WHERE <conditions> but this loses the speed advantages of TRUNCATE.
阅读全文
摘要:You can use trim on the column. The above is not DBMS-independent, since Sybase does not provide the trim function. However, the below approach will w
阅读全文
摘要:ORA-30926: unable to get a stable set of rows in the source tables 一.经检查,这个错误是由于数据来源表(即语句中,using后面的from关键字后面的表)存在数据重复造成的。在实际项目研发中,我们一般不能随便改动数据表的记录,那么如
阅读全文
摘要:MERGE INTO table_name alias1 USING (table|view|sub_query) alias2ON (join condition) WHEN MATCHED THEN UPDATE table_name SET col1 = col_val1, col2 = co
阅读全文
摘要:SELECT GUID, COUNT(*) FROM xx GROUP BY GUID HAVING COUNT(*) > 1;SELECT name, email, COUNT(*) FROM users GROUP BY name, email HAVING COUNT(*) > 1
阅读全文
摘要:Insert into T1select * from T2 where NOT EXISTS (select 1 from T1 X where X.GUID=T2.GUID);
阅读全文
摘要:作者:孤独烟 出处: http://rjzheng.cnblogs.com/ 在阿里的JAVA规范中也有下面这一条 【强制】不得使用外键与级联,一切外键概念必须在应用层解决。 但是呢,询问他们原因,大多是这么回答的 每次做DELETE 或者UPDATE都必须考虑外键约束,会导致开发的时候很痛苦,测试
阅读全文
摘要:ORACLE中的支持正则表达式的函数主要有下面四个: 1,REGEXP_LIKE :与LIKE的功能相似 2,REGEXP_INSTR :与INSTR的功能相似 3,REGEXP_SUBSTR :与SUBSTR的功能相似 4,REGEXP_REPLACE :与REPLACE的功能相似 它们在用法上与
阅读全文
摘要:The problem here is the way SQL*Plus interprets the commands passed to it. Remember the "SQL command terminators"? Semicolumn (;), slash (/) and a bla
阅读全文
摘要:$ export ORACLE_HOME=/opt/oraClient/11.2.0.4$ $ ./sqlplus -version SQL*Plus: Release 11.2.0.4.0 Production
阅读全文
摘要:CREATE TABLE new_table AS SELECT * FROM old_table
阅读全文
摘要:使用sqlldr导数时出现如下错误: " Record 1: Rejected - Error on table PC_PLANNAME, column PLANNAME.Field in data file exceeds maximum length " 上网查了一下找到原因了。 原来表中定义的
阅读全文
摘要:SELECT to_char(sysdate,'yyyymmdd hh:mi:ss'), to_char(sysdate + 1,'yyyymmdd hh:mi:ss'), to_char(sysdate + 1/24,'hh:mi:ss'), to_char(sysdate + 30/(24*60),'hh:mi:ss'), to_char(sysdate + 30/(24*60*60)...
阅读全文
摘要:SELECT '['|| to_char(325)||']', '['|| to_char(12325,'9,999.999')||']', '['|| to_char(12325,'99,999.999')||']', '['|| to_char(12325,'fm99,999.999')||']', '['|| to_char(0.25)||']', '['|| to_
阅读全文
摘要:SELECT SYSDATE, ADD_MONTHS(SYSDATE,2), ADD_MONTHS(SYSDATE,-2), LAST_DAY(SYSDATE), MONTHS_BETWEEN(SYSDATE,DATE'2015-12-22'), MONTHS_BETWEEN(SYSDATE,DATE'2020-12-22'), NEXT_DAY(SYSDATE,'SUNDAY'), N...
阅读全文
摘要:TRUNC:Returns the number or expression passed as parameterSyntax:TRUNC(original_number[,n])The parameter for the number of decimals (noriginal number
阅读全文
摘要:SUBSTR:Extracts a portion of a string.Syntax:SUBSTR(original_string,position[,substring_length])It returns a portion of original_string, beginning atI
阅读全文

浙公网安备 33010602011771号