Oracle子查詢、建立和管理表,oracle查詢建立

來源:互聯網
上載者:User

Oracle子查詢、建立和管理表,oracle查詢建立
總結子查詢

單行子查詢:返回單行
使用單行比較操作符
多行子查詢:多行子查詢返回多行
多行操作符:
IN, ANY,ALL
若子查詢查詢結果為空白,則不返回任何行

建立和管理表查詢資料字典

查看使用者定義的表:

SELECT table_nameFROM user_tables;

查看使用者定義的各種資料對象:

SELECT distinct object_typeFROM user_objects;

查看使用者定義的表,視圖,同義字和序列

SELECT *FROM user_catalog;

建表:CREATE table
兩種方式:

修改表:ALTER table

重新命名表:
RENAME dept TO detail_dept;
Table renamed.

刪除表:
DROP TABLE dept80;
Table dropped.

清空表:
TRUNCATE TABLE detail_dept;
Table truncated.

以上這些DDL語言不能復原,會自動認可
具體的還是需要多練才能夠熟悉,精通

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.