next up previous contents index
Next: Interface Flags: Up: Using the interface: Previous: Data dictionary   Contents   Index

Other database operations:

db_create_table('TABLE_NAME','FIELDS')
FIELDS is the field specification as in SQL.

eg. db_create_table('DEPT', 'DEPTNO NUMBER(2),
                             DNAME VARCHAR2(14),
                             LOC VARCHAR2(13)').

db_create_index('TABLE_NAME','INDEX_NAME', index(_,Fields))
Fields is the list of columns for which an index is requested. For example:

db_create_index('EMP', 'EMP_KEY', index(_,'DEPTNO, EMPNO')).

db_delete_table('TABLE_NAME')
To delete a table named 'TABLE_NAME'

db_delete_view('VIEW_NAME')
To delete a view named 'VIEW_NAME'

db_delete_index('INDEX_NAME')
To delete an index named 'INDEX_NAME'

These following predicates are the supported PRODBI syntax for deleting and inserting rows:

db_add_record('DEPT',[30,'SALES','CHICAGO'])
arguments are a list composed of field values and the table name to insert the row.

delete_record('DEPT', [40,_,_])
to delete rows from 'DEPT' matching the list of values mentioned in second argument.

For other SQL statements use db_sql/1 with the SQL statement as the first argument. For example:

db_sql('grant connect to fred identified by bloggs')).



Baoqiu Cui
2000-04-23