重庆思庄Oracle、Redhat认证学习论坛
标题:
ORACLE 23C新特性之三:IF [NOT] EXISTS Syntax Support
[打印本页]
作者:
郑全
时间:
2023-4-20 14:42
标题:
ORACLE 23C新特性之三:IF [NOT] EXISTS Syntax Support
对于 IF [NOT] EXISTS Syntax Support,在MYSQL,PG中存在,ORACLE 23C以前版本是不支持的,从23C开始,ORACLE也提供对应的功能:
如下:
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
SQL>
SQL>
SQL> CREATE TABLE IF NOT EXISTS t1 (c1 number);
Table created.
SQL> desc t1
Name Null? Type
----------------------------------------- -------- ----------------------------
C1 NUMBER
SQL> ALTER TABLE IF EXISTS t1 modify (c1 primary key);
Table altered.
SQL>
SQL> DROP TABLE IF EXISTS t1;
Table dropped.
SQL>
具体可以参见:
https://www.oracle.com/pls/topic ... C-862F-CBD276BDA3F1
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2