2024-11-26 08:06:56
2024-11-26 15:39:08
2024-11-26 14:35:20
2024-11-26 17:50:05
2024-11-26 16:18:02
你是说表里面有多少列么?
SQL> desc emp
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> select count(COLUMN_NAME) from USER_TAB_COLUMNS where TABLE_NAME='EMP';
COUNT(COLUMN_NAME)
------------------
8
类似的视图还有DBA_TAB_COLUMNS 和 ALL_TAB_COLUMNS