Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Reported for Version 1.01 » View Incident Report |
Serious |
Reported By: Ole Willy Tuv Reported On: 3/7/2007 For: Version 1.01 Build 1 |
create procedure sp_test() begin declare stmt statement; --delete table t2 if exists prepare stmt from ' select 1 from information.tables where upper(name) = ''T2'' '; execute stmt; if (rowsaffected(stmt) = 1) then execute immediate 'alter table t2 drop constraint fk_t2'; --workaround execute immediate 'drop table t2'; end if; --delete table t1 if exists prepare stmt from ' select 1 from information.tables where upper(name) = ''T1'' '; execute stmt; if (rowsaffected(stmt) = 1) then execute immediate 'drop table t1'; end if; --table t1 execute immediate ' create table t1 ( pkey integer not null, constraint pk_t1 primary key (pkey) ) '; execute immediate 'insert into t1 (pkey) values (1)'; --table t2 execute immediate ' create table t2 ( pkey integer not null, fkey integer, constraint pk_t2 primary key (pkey), constraint fk_t2 foreign key (fkey) references t1 (pkey) ) '; execute immediate 'insert into t2 (pkey,fkey) values (100,1)'; unprepare stmt; end
This web page was last updated on Wednesday, March 20, 2024 at 07:22 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |