1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
USE [BASE_003_SI]
GO
create table TEST2(
champ1 varchar(10),
champ2 varchar(10),
champ3 varchar(10),
champ4 varchar(10),
champ5 varchar(10),
CONSTRAINT [PK_TEST2_15] PRIMARY KEY
(
champ1 ASC,
champ5 ASC
)
)
ALTER TABLE [dbo].[TEST2] WITH NOCHECK ADD CONSTRAINT [CHK_2_TEST2] CHECK (([champ5]='2'))
GO
ALTER TABLE [dbo].[TEST2] CHECK CONSTRAINT [CHK_2_TEST2]
GO
USE [BASE_004_SI]
GO
create table TEST3(
champ1 varchar(10),
champ2 varchar(10),
champ3 varchar(10),
champ4 varchar(10),
champ5 varchar(10),
CONSTRAINT [PK_TEST3_15] PRIMARY KEY
(
champ1 ASC,
champ5 ASC
)
)
ALTER TABLE TEST3 WITH NOCHECK ADD CONSTRAINT [CHK_3_TEST3] CHECK (([champ5]='3'))
GO
ALTER TABLE TEST3 CHECK CONSTRAINT [CHK_3_TEST3]
GO
USE [BASE_002_SI]
GO
create view TESTVW AS SELECT * FROM BASE_003_SI.dbo.TEST2
UNION ALL SELECT * FROM BASE_004_SI.dbo.TEST3 |
Partager