当前位置:Gxlcms > 数据库问题 > oracle-sql系统学习

oracle-sql系统学习

时间:2021-07-01 10:21:17 帮助过:28人阅读

SCHEMA AUTHORIZATION oe CREATE TABLE new_product (color VARCHAR2(10) PRIMARY KEY, quantity NUMBER) CREATE VIEW new_product_view AS SELECT color, quantity FROM new_product WHERE color = RED GRANT select ON new_product_view TO hr;

 

create table

create table aa

  --关系表,要么是关系属性

    (name varchar2(5),age number(3))

  --关系表,要么是as subquery

    as select * from a1;

  --object_type,

    of ...

  --xml_type

    of ...

指定global temporary来指示表是临时表,它的定义对所有session可见,数据只可被插入表的哪个session可见,其它session不可见

create table a4 as select * from aa;
create table a5 (
  col1 varchar2(3) default 2 not null,
  --col2 as (sysdate),
  col3 number(2) unique
);
desc a5;
drop table a5 purge;
show recyclebin;
purge recyclebin;

select * from user_constraints;

 

oracle-sql系统学习

标签:arc   create   XML   global   code   schema   用户   可见   临时表   

人气教程排行