Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. USE [Database]
  2. GO
  3.  
  4. SET ANSI_NULLS ON
  5. GO
  6.  
  7. SET QUOTED_IDENTIFIER ON
  8. GO
  9.  
  10. SET ANSI_PADDING ON
  11. GO
  12.  
  13. CREATE TABLE [dbo].[Tbl_A]
  14. (
  15. [id] [int] IDENTITY(1,1) NOT NULL,
  16. [Name] [varchar](255) NOT NULL,
  17. CONSTRAINT [PK_Tbl_A] PRIMARY KEY CLUSTERED
  18. (
  19. [id] ASC
  20. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  21. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  22.  
  23. GO
  24.  
  25. CREATE TABLE [dbo].[Tbl_A_Proxy]
  26. (
  27. [id] [int] NOT NULL,
  28. CONSTRAINT [PK_Tbl_A_Proxy] PRIMARY KEY CLUSTERED
  29. (
  30. [id] ASC
  31. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  32. ) ON [PRIMARY]
  33.  
  34. GO
  35.  
  36. ALTER TABLE [Database].[dbo].[Tbl_A_Proxy]
  37. ADD CONSTRAINT [FK_Tbl_AProxy]
  38. FOREIGN KEY ([id])
  39. REFERENCES [Database].[dbo].[Tbl_A]([id])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement