Copy table structure and do not copy table data

Reference https://blog.csdn.net/jiankunking/article/details/17992727
is generally used to select the table structure. The table structure refers to the name, type, and number of columns in the table .
Generally: 
CREATE TABLE B AS SELECT * FROM A WHERE 1<>1
This will copy a table structure without copying the data.
Because ORACLE has no boolean literal value, it cannot be written as WHERE FALSE, but can only be written as 1<>1, <> means not equal, of course you write 1=2, 2<>2,
2<1, 10000<3.1415 can represent "FALSE", that is, the condition is "false".

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325678816&siteId=291194637