Check table layout
If you need to check the current table layout with what
it should be according to DDLs in the $TOP/src/db/schema/gen/
*
directory.
Symptoms
- Oracle:
- To check for a specific table, run either of the following commands
within sqlplus:or SQL:
describe <tablename>
SELECT
column_name "Name",
nullable "Null?",
concat(concat(concat(data_type,'('),data_length),')') "Type"
FROM user_tab_columns
WHERE table_name='<tablename in uppercase>';
- To check for a specific table, run either of the following commands
within sqlplus:
- DB2®:
- On the command line, you can retrieve details by running the following command:
db2 describe table VAN1012E.TUTL_LCK_LOCK show detail
- Alternatively, you could issue the db2look command to get DDLs for
various database objects. For example, to extract all of the table and index definitions for a
schema:
db2look -d <DBname> -z <schemaname> -e -f -o db2look.sql
-e: extract DDL statements
-f: extract configuration parameters and registry variables that affect the query optimizer
- On the command line, you can retrieve details by running the following command: