create table emp_dept_txt as select first_name,last_name,email,phone_number,department_name from employees ,departments where employees.department_id=departments.department_id and 1=0;
SQL> select * from emp_dept_txt;
no rows selected
SQL> desc emp_dept_txt
Name Null? Type
----------------------------------------- -------- ----------------------------
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
新闻标题:createtableasselectwhere1=0会把null和notnull属性也带上
网站URL:
http://bzwzjz.com/article/geigos.html