12C SQL??????????С??
???????????? ???????[ 2014/11/25 13:35:30 ] ??????????????? ????? SQL???
????DDL???
??????????汾????п??????????DDL????????????????????12c R1?У???????????DDL????д??xml?????????С??????????????????????create??drop???????????????????????????????ENABLE_DDL_LOGGING ??????????????á??????????????????????????????á????????????????????е?DDL?????????$ORACLE_BASE/diag/rdbms/DBNAME/log|ddl ·???μ?xml?????????С????xml?а???DDL????IP?????????????????????????????????????????????????????????DDL?????????????
????????DDL???????
????SQL> ALTER SYSTEM|SESSION SET ENABLE_DDL_LOGGING=TRUE;
???????μ?DDL???????????xml?????????У?
????CREATE|ALTER|DROP|TRUNCATE TABLE
????DROP USER
????CREATE|ALTER|DROP PACKAGE|FUNCTION|VIEW|SYNONYM|SEQUENCE
????????CASCADE
??????????汾?У??????????????????????????????????£????????????????????????12c?е????CASCADE??????TRUNCATE TABLE???????????е?????????????????е??????????DELETE ON CASCADE??????????á?????????????????????????????????????????CAP???????????????????????????
?????????????????????????????????????????????????μ?CASCADE???????????????????????????????
????SQL> TRUNCATE TABLE CASCADE;
????SQL> TRUNCATE TABLE PARTITION CASCADE;
????????????????????ж???ON DELETE CASCADE ????????????ORA-14705????
??????SQL*Plus????????
????SQL*Plus??????????12c?У?????????????RefCursor??????£?SQL*Plus?????PL/SQL??????????α???????????μ?dbms_sql.return_result????????PL/SQL ??????SELECT ?????????????????????????и?????????′??????÷?????????????
????SQL> CREATE PROCEDURE mp1
????res1 sys_refcursor;
????BEGIN
????open res1 for SELECT eno??ename??sal FROM emp;
????dbms_sql.return_result(res1);
????END;
????SQL> execute mp1;
????????????????У?????SQL*Plus???????????????
????????????
??????12c?????????????μ??????????????????????????????Щ???е????????л???????????????????á?
???????????л????????????Χ???????Щ?????????????????????????????????????????е?????????????????????????????????????У?
????SQL> CREATE SEQUENCE my_seq START WITH 1 INCREMENT BY 1 SESSION;
????SQL> ALTER SEQUENCE my_seq GLOBAL|SESSION;
??????????????У?CACHE?? NOCACHE?? ORDER ?? NOORDER ????????????
????WITH???????
??????12c?У????????SQL?????????PL/SQL????????????Щ????SQL????WITH??????????????????????????????????WITH????ж????????????????????
????WITH
????PROCEDURE|FUNCTION test1 (…)
????BEGIN
????END;
????SELECT FROM table_name;
????/
??????????????PL/SQL?????????WITH????????????PL/SQL??????????????SQL???????á?
???????????????
??????12c?У???????汾????????VARCHAR2?? NAVARCHAR2??? RAW??Щ??????????С???4K???2K????????32K????????????????????С?????LOB???????????á????????????????С???????MAX_STRING_SIZE?????????????????EXTENDED??
???????????????????????????1????
????1. ????????
????2. ?????????????????
????3. ???????: ALTER SYSTEM SET MAX_STRING_SIZE=EXTENDED;
????4. ??? utl32k.sql as sysdba : SQL> @?/rdbms/admin/utl32k.sql
????5. ????????
????6. ???д???????????
???????LOB???????????ASSM????????У??????????????????SecureFiles LOB????洢???????ASSM????????У???????????BasciFiles LOB???д洢???
????????????????????????????STANDARD??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11