Subject | Re: [firebird-support] Newbie Questions |
---|---|
Author | Martijn Tonies |
Post date | 2004-04-01T11:24:22Z |
Hi Jules,
a resultset.
If you want to create a SELECT-able procedure, that can be
used like this:
select * from testproc [(optional variables)]
Then use something like:
create procedure testproc returns (output1 integer, output2 integer)
as begin
for select column1, column2
from testtable
into :output1, :output2
do suspend;
end
The "suspend" signals Firebird that it should wait with outputting rows
of the cursor (FOR SELECT ... DO) until the client/caller fetches
more rows.
You can add a check constraint to Domains as well.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I'm a fluent SQL Server user and am investigating Firebird and wasWith Firebird, you cannot just create procedures that return
> wondering if someone could help me with a couple of issues.
>
> 1) I'm trying to create a stored procedure as follows but it always
> errors and won't compile. Any idea what is wrong?
>
> create procedure testproc as
> begin
> select * from testtable;
> end
a resultset.
If you want to create a SELECT-able procedure, that can be
used like this:
select * from testproc [(optional variables)]
Then use something like:
create procedure testproc returns (output1 integer, output2 integer)
as begin
for select column1, column2
from testtable
into :output1, :output2
do suspend;
end
The "suspend" signals Firebird that it should wait with outputting rows
of the cursor (FOR SELECT ... DO) until the client/caller fetches
more rows.
> 2) In Firebird what is the concept of "Domains"?Pretty much the same as "User Defined Types" in MSSQL Server.
You can add a check constraint to Domains as well.
> 3) What does the $ symbol mean in various table names? Is this just aThe RDB$... are system tables.
> naming convention or does it have a specific function in firebird?
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com