Advertisement
Guest User

scripts

a guest
Sep 16th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.93 KB | None | 0 0
  1. USE [Project]
  2. GO
  3. /****** Object:  Table [dbo].[Category]    Script Date: 16/09/2019 7:14:10 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. SET ANSI_PADDING ON
  9. GO
  10. CREATE TABLE [dbo].[Category](
  11.     [CategoryId] [int] IDENTITY(1,1) NOT NULL,
  12.     [Name] [varchar](100) NOT NULL,
  13.     [ImagePath] [varchar](200) NOT NULL,
  14. PRIMARY KEY CLUSTERED
  15. (
  16.     [CategoryId] ASC
  17. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  18. ) ON [PRIMARY]
  19.  
  20. GO
  21. SET ANSI_PADDING OFF
  22. GO
  23. /****** Object:  Table [dbo].[Recipes]    Script Date: 16/09/2019 7:14:10 ******/
  24. SET ANSI_NULLS ON
  25. GO
  26. SET QUOTED_IDENTIFIER ON
  27. GO
  28. SET ANSI_PADDING ON
  29. GO
  30. CREATE TABLE [dbo].[Recipes](
  31.     [RecipesId] [int] IDENTITY(1,1) NOT NULL,
  32.     [Name] [varchar](100) NOT NULL,
  33.     [ImagePath] [varchar](200) NOT NULL,
  34.     [CategoryId] [int] NOT NULL,
  35. PRIMARY KEY CLUSTERED
  36. (
  37.     [RecipesId] ASC
  38. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  39. ) ON [PRIMARY]
  40.  
  41. GO
  42. SET ANSI_PADDING OFF
  43. GO
  44. SET IDENTITY_INSERT [dbo].[Category] ON
  45.  
  46. GO
  47. INSERT [dbo].[Category] ([CategoryId], [Name], [ImagePath]) VALUES (1, N'Recetas de comida China', N'chinese/chinese_category.jpg')
  48. GO
  49. INSERT [dbo].[Category] ([CategoryId], [Name], [ImagePath]) VALUES (2, N'Recetas de comida Francesa', N'french/french_category.jpg')
  50. GO
  51. SET IDENTITY_INSERT [dbo].[Category] OFF
  52. GO
  53. /****** Object:  StoredProcedure [dbo].[CategorySelectAll]    Script Date: 16/09/2019 7:14:10 ******/
  54. SET ANSI_NULLS ON
  55. GO
  56. SET QUOTED_IDENTIFIER ON
  57. GO
  58. create proc [dbo].[CategorySelectAll]
  59. as
  60. begin
  61. SELECT * FROM Category
  62. end
  63. GO
  64. /****** Object:  StoredProcedure [dbo].[RecipesSelectAll]    Script Date: 16/09/2019 7:14:10 ******/
  65. SET ANSI_NULLS ON
  66. GO
  67. SET QUOTED_IDENTIFIER ON
  68. GO
  69. create proc [dbo].[RecipesSelectAll]
  70. as
  71. begin
  72. SELECT * FROM Recipes
  73. end
  74. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement