首页 > 代码库 > Oracle碎碎念~2

Oracle碎碎念~2

1. 如何查看表的列名及类型

SQL> select column_name,data_type,data_length from all_tab_columns where owner=SCOTT and  table_name=EMP;COLUMN_NAME    DATA_TYPE  DATA_LENGTH--------------- ---------- -----------EMPNO        NUMBER            22ENAME        VARCHAR2        10JOB        VARCHAR2         9MGR        NUMBER            22HIREDATE    DATE             7SAL        NUMBER            22COMM        NUMBER            22DEPTNO        NUMBER            228 rows selected.

 

Oracle碎碎念~2