How to get table schema via query? (DBMR3207)

~ 0 min
2020-04-23 04:25

From DBMaker 5.4.3, you can get table schema via dmSQL or JDBA tool.

 

1. There is a table t1 in the database. Enter below command, you can get table schema.

 

 dmSQL> def table t1;

 

 create table SYSADM.T1(

ID INTEGER not null  ,

NAME CHAR(20) default null)

in DEFTABLESPACE lock mode row fillfactor 100;

create index IDX1 on SYSADM.T1(ID asc) where id > 2 in DEFTABLESPACE;

create index IDX2 on SYSADM.T1(NAME asc) where name like '%a' in DEFTABLESPACE;

create index IDX3 on SYSADM.T1(ID asc, NAME asc) where id < 3 and name like '%p%' in DEFTABLESPACE;

alter table SYSADM.T1 primary key (ID) in DEFTABLESPACE;

 

2. Using JDBA tool.

    a. Open JDBA tool.

    b. Connect to the database.

    c. Right-click the table

    d. Click “Define table”, you can see the table schema in right side.

 

In addition, if you want to get schema with SQL statement, you can enter below command.

dmSQL> unload schema from table_name to file_name;

 

Version: 5.4.3

Product: Normal/Bundle

Platform: Windows/Linux

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags