The IF NOT EXISTS gives the “created” feedback message even when the object already exists :
sh-4.4$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - Developer-Release on Tue Apr 4 20:39:49 2023
Version 23.2.0.0.0
Copyright (c) 1982, 2023, Oracle. All rights reserved.
Connected to:
Oracle Database 23c Free, Release 23.0.0.0.0 - Developer-Release
Version 23.2.0.0.0
SQL> create table demo(answer) as select 42;
Table created.
SQL> create table if not exists demo(question) as select 42;
Table created.
SQL> desc demo
Name Null? Type
----------------------------------------- -------- ----------------------------
ANSWER NUMBER
SQL>
Then, from the log, it is impossible to know if the table was created by the statement or not.
For better developer experience, it should be preferable to have a warning like PostgreSQL does:
$ psql -p 5433 -d yugabyte
psql (14.5, server 11.2-YB-2.17.2.0-b0)
Type "help" for help.
yugabyte=# create table demo(answer) as select 42;
SELECT 1
yugabyte=# create table if not exists demo(question) as select 42;
NOTICE: relation "demo" already exists, skipping
CREATE TABLE AS
yugabyte=#