Product Documentation

FairCom ISQL

Previous Topic

Next Topic

Examples

The following example uses the -t option with a table list to generate the table definitions only for the specified table in the rdsdb database:


> dbschema -t dbp1,test_view rdsdb

FairCom/DBSCHEMA Version 9.1.17573(Build-090721)

FairCom Corporation (C) 1992-2009.

Dharma Systems Pvt Ltd-Dharma Systems Inc (C) 1992-2009.


create table ADMIN.dbp1 (

c1 integer

) pctfree 20;


create view ADMIN.test_view (

fld

) as

select * from test_revoke1 ;


The following example uses the -p option with the % wildcard character to generate definitions for all stored procedures whose names begin with the characters “foo”:


> dbschema -p foo% rdsdb

FairCom/DBSCHEMA Version 9.1.17573(Build-090721)

FairCom Corporation (C) 1992-2009.

Dharma Systems Pvt Ltd-Dharma Systems Inc (C) 1992-2009.

CREATE PROCEDURE ADMIN.foobar(in sno character (5),

in sname character (20),

in sstatus smallint,

in scity character (15))

IMPORT


BEGIN

SQLIStatement stmt = new SQLIStatement("insert into s values ('foo', 'foo', 3, '

foo')"); stmt.execute();


END


The following example uses the -o option to write all definitions for the rdsdb database to the file schema.sql:


> dbschema -o schema.sql -u ADMIN -a ADMIN rdsdb

FairCom/DBSCHEMA Version 9.1.17573(Build-090721)

FairCom Corporation (C) 1992-2009.

Dharma Systems Pvt Ltd-Dharma Systems Inc (C) 1992-2009.


> more schema.sql


create table ADMIN.test_revoke1 (

fld integer

) pctfree 20;

...


TOCIndex