Advertisement
kavallo

Script DB Clase

Apr 10th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.25 KB | None | 0 0
  1. USE [DATA]
  2. GO
  3. /****** Object:  Table [dbo].[Empleado]    Script Date: 4/10/2014 5:19:00 PM ******/
  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].[Empleado](
  11.     [id] [INT] NOT NULL,
  12.     [nombre] [VARCHAR](50) NULL,
  13.     [sueldo] [INT] NULL,
  14.     [moroso] [INT] NULL
  15. ) ON [PRIMARY]
  16.  
  17. GO
  18. SET ANSI_PADDING OFF
  19. GO
  20. /****** Object:  Table [dbo].[Empleado_Ingreso]    Script Date: 4/10/2014 5:19:00 PM ******/
  21. SET ANSI_NULLS ON
  22. GO
  23. SET QUOTED_IDENTIFIER ON
  24. GO
  25. CREATE TABLE [dbo].[Empleado_Ingreso](
  26.     [id] [INT] IDENTITY(1,1) NOT NULL,
  27.     [FechaIngreso] [DATE] NULL,
  28.  CONSTRAINT [PK_Empleado_Ingreso] 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. /****** Object:  Table [dbo].[Pagos]    Script Date: 4/10/2014 5:19:00 PM ******/
  36. SET ANSI_NULLS ON
  37. GO
  38. SET QUOTED_IDENTIFIER ON
  39. GO
  40. SET ANSI_PADDING ON
  41. GO
  42. CREATE TABLE [dbo].[Pagos](
  43.     [id_pagos] [INT] IDENTITY(1,1) NOT NULL,
  44.     [fecha_pago] [DATE] NULL,
  45.     [id_empleado] [INT] NULL,
  46.     [Concepto] [VARCHAR](50) NULL,
  47.  CONSTRAINT [PK_Pagos] PRIMARY KEY CLUSTERED
  48. (
  49.     [id_pagos] ASC
  50. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  51. ) ON [PRIMARY]
  52.  
  53. GO
  54. SET ANSI_PADDING OFF
  55. GO
  56. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (1, N'JOSE', 1000, 0)
  57. GO
  58. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (2, N'PEDRO', 1500, 1)
  59. GO
  60. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (3, N'JUAN', 2000, 0)
  61. GO
  62. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (4, N'MARIA', 1500, 1)
  63. GO
  64. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (5, N'JUANA', 1000, 1)
  65. GO
  66. INSERT [dbo].[Empleado] ([id], [nombre], [sueldo], [moroso]) VALUES (5, N'Manuel', 2800, 0)
  67. GO
  68. SET IDENTITY_INSERT [dbo].[Empleado_Ingreso] ON
  69.  
  70. GO
  71. INSERT [dbo].[Empleado_Ingreso] ([id], [FechaIngreso]) VALUES (1, CAST(0xF1230B00 AS DATE))
  72. GO
  73. INSERT [dbo].[Empleado_Ingreso] ([id], [FechaIngreso]) VALUES (2, CAST(0x50320B00 AS DATE))
  74. GO
  75. INSERT [dbo].[Empleado_Ingreso] ([id], [FechaIngreso]) VALUES (3, CAST(0x822F0B00 AS DATE))
  76. GO
  77. INSERT [dbo].[Empleado_Ingreso] ([id], [FechaIngreso]) VALUES (4, CAST(0x3F2C0B00 AS DATE))
  78. GO
  79. INSERT [dbo].[Empleado_Ingreso] ([id], [FechaIngreso]) VALUES (5, CAST(0xD6280B00 AS DATE))
  80. GO
  81. SET IDENTITY_INSERT [dbo].[Empleado_Ingreso] OFF
  82. GO
  83. SET IDENTITY_INSERT [dbo].[Pagos] ON
  84.  
  85. GO
  86. INSERT [dbo].[Pagos] ([id_pagos], [fecha_pago], [id_empleado], [Concepto]) VALUES (1, CAST(0x69380B00 AS DATE), 5, N'Sueldo')
  87. GO
  88. INSERT [dbo].[Pagos] ([id_pagos], [fecha_pago], [id_empleado], [Concepto]) VALUES (2, CAST(0x69380B00 AS DATE), 3, N'Avance')
  89. GO
  90. INSERT [dbo].[Pagos] ([id_pagos], [fecha_pago], [id_empleado], [Concepto]) VALUES (3, CAST(0x69380B00 AS DATE), 4, N'Avance')
  91. GO
  92. INSERT [dbo].[Pagos] ([id_pagos], [fecha_pago], [id_empleado], [Concepto]) VALUES (4, CAST(0x69380B00 AS DATE), 1, N'Sueldo')
  93. GO
  94. INSERT [dbo].[Pagos] ([id_pagos], [fecha_pago], [id_empleado], [Concepto]) VALUES (5, CAST(0x69380B00 AS DATE), 2, N'Sueldo')
  95. GO
  96. SET IDENTITY_INSERT [dbo].[Pagos] OFF
  97. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement