mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Bring employee database up to dialect 3
This commit is contained in:
parent
83618e0365
commit
7de72dd72a
@ -16,7 +16,7 @@
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
set sql dialect 1;
|
||||
set sql dialect 3;
|
||||
/* create database 'employee.fdb'; */
|
||||
create database 'empbuild.fdb';
|
||||
show version;
|
||||
|
@ -45,6 +45,7 @@ static int addqtr (void);
|
||||
|
||||
static TEXT Db_name[128];
|
||||
static FILE *Fp;
|
||||
EXEC SQL SET SQL DIALECT 3;
|
||||
|
||||
EXEC SQL INCLUDE SQLCA;
|
||||
|
||||
|
@ -244,6 +244,7 @@ SET TERM !! ;
|
||||
CREATE TRIGGER set_emp_no FOR employee
|
||||
BEFORE INSERT AS
|
||||
BEGIN
|
||||
if (new.emp_no is null) then
|
||||
new.emp_no = gen_id(emp_no_gen, 1);
|
||||
END !!
|
||||
|
||||
@ -396,6 +397,7 @@ SET TERM !! ;
|
||||
CREATE TRIGGER set_cust_no FOR customer
|
||||
BEFORE INSERT AS
|
||||
BEGIN
|
||||
if (new.cust_no is null) then
|
||||
new.cust_no = gen_id(cust_no_gen, 1);
|
||||
END !!
|
||||
|
||||
|
@ -45,6 +45,7 @@ static int addqtr (void);
|
||||
|
||||
static TEXT Db_name[128];
|
||||
static FILE *Fp;
|
||||
EXEC SQL SET SQL DIALECT 3;
|
||||
|
||||
EXEC SQL INCLUDE SQLCA;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user