Subject Re: [ib-support] Default value on insert in stored procedure
Author Martijn Tonies
Hi,

> I want to insert record in a table from a stored procedure. Field's
> values are variables (declare variable or parameter).
> I want to use field's default values of the table.
>
> Is there another way than using rdb$ fields and rdb$ tables ?
> When using :
> select rdb$default_value from rdb$relation_fields
> where rdb$field_name = 'FieldName' and rdb$relation_name =
> 'TableName'
> I get a blob I can't read nor use
>
> When reading ANSI SQL 92 (ISO/IEC 9075:1992), there is a keyword
> DEFAULT which (if I make no mistake) can be used as
> insert into TableName (FieldName1, FieldName2, ...)
> values (Value1, DEFAULT, ...
> Is this functionnality in Firebird 1.5 or 2.0 ?

If you know when to use DEFAULT, why not simply leave the column
out of the INSERT?

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."