Subject | Re: [ib-support] Table layouts |
---|---|
Author | Nando Dessena |
Post date | 2001-10-25T18:50:33Z |
Dave,
systema tables, but there is not DSQL interface that will handle it (ie
you would have to do direct DML against the system tables to read and
write that description).
create generator my_gen
and a trigger
create trigger set_id for my_table before insert
as
begin
if (new.id is null or new.id = 0) then
new.id = gen_id(my_gen, 1);
end
HTH
--
____
_/\/ando
> I'm creating tables for the first time with interbase 6 and need to know the table description function - equivalent tothe closest thing to it that I know id the RDB$DESCRIPTION field on many
> desc <tablename>; of MySQL/Oracle which prints a layout/description of each column in the table.
systema tables, but there is not DSQL interface that will handle it (ie
you would have to do direct DML against the system tables to read and
write that description).
> And also the easiest way to automatically generate incremented column ids for new rows inserted into a table. (Equivalent of creating the column as 'auto_increment' with mysql).Use a generator
create generator my_gen
and a trigger
create trigger set_id for my_table before insert
as
begin
if (new.id is null or new.id = 0) then
new.id = gen_id(my_gen, 1);
end
HTH
--
____
_/\/ando