Subject | Re: [ib-support] Add a column to a table via stored proc |
---|---|
Author | Martijn Tonies |
Post date | 2002-10-01T11:41:15Z |
Dave,
cycle is needed.
want to do this?"
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com
Firebird Workbench - the developer tool for Firebird
http://www.upscene.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> I am using ibobjects with firebird.Via
> I want to add a column to table B when a new record is added to Table A.
> a trigger and a stored proc.Right - and for a reason.
>
> I cannot do this using SQL syntax ('alter table B add Fred smallint')
> because that is not available in stored proc.
>But I suppose I can alter theto
> appropriate RDB$ files by stored proc.
>
> It is a very simple column of smallint with no index or other constraints
> that I want to add (or occasionally drop). I see that I can add a record
> RDB$RelationFields.I haven't tried it, but I expect it not to work either.
> But are there any dire pitfalls to this ?Yes - you can only change a table 255 times before a backup/restore
cycle is needed.
> And are there other RDB$ entries to be made at the same time.The question shouldn't be: "can it be done?" It should be: "why do you
> (In other words what, in terms of the system relations, does the sql
> statement "alter table B add Fred smallint" achieve ?)
want to do this?"
With regards,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com
Firebird Workbench - the developer tool for Firebird
http://www.upscene.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."