摘要:
1、全角转半角函数 TO_SINGLE_BYTE 2、数字转英文,利用to_char、to_date 3、sys_guid()1、全角转半角函数 TO_SINGLE_BYTESQL> select TO_SINGLE_BYTE('oracle') from dual;TO_SINGLE_BYTE('ORACLE')------------------------------oracle2、数字转英文,利用to_char、to_dateSQL> select to_char(to_date('12345','J'), 阅读全文
摘要:
create sequence seq2start with 0 --起始值increment by 1 --步长maxvalue 4999 --最大值minvalue 0 --最小值cycle --循环cache 4 --缓存4个数create table testa(ins number(4) primary key,nm varchar2(20));-- Created on 2007-10-17 by YCZ declare -- Local variables herei integer;begin-- Test statements herefor i in 1..5000 loo 阅读全文
摘要:
数据字典dict总是属于Oracle用户sys的。 1、用户: select username from dba_users; 改口令 alter user spgroup identified by spgtest; 2、表空间: select * from dba_data_files; select * from dba_tablespaces;//表空间 select tablespace_name,sum(bytes), sum(blocks) from dba_free_space group by tablespace_name;//空闲表空间 select * from dba 阅读全文
摘要:
--列转行CREATE TABLE t_col_row(ID INT,c1 VARCHAR2(10),c2 VARCHAR2(10),c3 VARCHAR2(10));INSERT INTO t_col_row VALUES (1, 'v11', 'v21', 'v31');INSERT INTO t_col_row VALUES (2, 'v12', 'v22', NULL);INSERT INTO t_col_row VALUES (3, 'v13', NULL, 'v33'); 阅读全文
摘要:
用法if ... then ... elsif ... then ... else ... end if; if ... then ... else ... end if; if ... then ... end if; 阅读全文
摘要:
The table below shows the ADO Data Type mapping between Access, SQL Server, and Oracle:DataType EnumValueAccessSQLServerOracleadBigInt20BigInt (SQL Server 2000 +)adBinary128BinaryTimeStampRaw *adBoolean11YesNoBitadChar129CharCharadCurrency6CurrencyMoneySmallMoneyadDate7DateDateTimeadDBTimeStamp135Da 阅读全文