Querying oracle table field information can be called metadata. Someone asked how to export the table field information today. To tell the truth, I will not use plsql develper to export the table structure, as shown in: When writing a Database Design Manual, you want to copy the table to get twice the result with half the effort. You don't have to copy and paste the table one by one, and reduce the probability of errors, but unfortunately, this interface does not seem to support full selection and multi-choice, and cannot be copied as a whole. Maybe plsql develper has this function, but I still don't know it, but oralce is the most powerful data storage mechanism, metadata must be well done, so there must be an alternative to this problem. After a period of experimentation, you can meet the basic requirements:
[SQL] select t. table_name, t. column_name, c. DATA_TYPE, c. DATA_LENGTH, t. comments from USER_COL_COMMENTS t, USER_TAB_COLUMNS c where c. column_name = t. column_name and c. TABLE_NAME = 'config _ db' and c. TABLE_NAME = t. TABLE_NAME
The result is as follows: You can see that multiple selections and copies are supported, and the information here is the same, which can meet our requirements. To write the Data Length and Data Type together, you can use the following improved version:
[SQL] select t. table_name, t. column_name, c. DATA_TYPE | '(' | c. DATA_LENGTH | ')', t. comments from USER_COL_COMMENTS t, USER_TAB_COLUMNS c where c. column_name = t. column_name and c. TABLE_NAME = 'config _ db' and c. TABLE_NAME = t. TABLE_NAME
Effect