Create schema
This statement does not actually create a schema that automatically creates a schema when the user is created, which allows you to populate your schema with tables and views and authorization for those objects, without multiple transactions, and only one transaction, and any statement with an error will roll back all statements.
Create multiple tables and views and objects at once. There is only one transaction, not many times, which is the focus
CREATE SCHEMA AUTHORIZATIONOECREATE TABLEnew_product (ColorVARCHAR2(Ten)PRIMARY KEY, quantity Number)CREATE VIEWNew_product_view as SELECTColor, quantity fromNew_productWHEREColor= 'RED'GRANT Select onNew_product_view tohr
CREATE table
CREATE TABLE AA
--relational tables, or relationship properties
(Name VARCHAR2 (5), age number (3))
--relational tables, or as subquery
As select * FROM A1;
--object_type,
Of ...
--xml_type
Of ...
Specify global temporary to indicate that the table is a temporary table, its definition is visible to all sessions, the data can only be inserted into the table which session is visible, the other session is not visible
Create TableA4 as Select * fromAA;Create TableA5 (col1varchar2(3)default 2 not NULL, --col2 as (sysdate),Col3 Number(2)Unique);descA5;Drop TableA5 purge;show recyclebin;purge recyclebin;Select * fromuser_constraints;
Oracle-sql System Learning