SHARE
TWEET

sql generado

a guest Oct 15th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. USE [master]
  2. GO
  3. /****** Object:  Database [P1_x3865181p]    Script Date: 15/10/2019 14:10:35 ******/
  4. CREATE DATABASE [P1_x3865181p]
  5.  CONTAINMENT = NONE
  6.  ON  PRIMARY
  7. ( NAME = N'P1_x3865181p', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\P1_x3865181p.mdf' , SIZE = 4288KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
  8.  LOG ON
  9. ( NAME = N'P1_x3865181p_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\P1_x3865181p_log.ldf' , SIZE = 1072KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
  10. GO
  11. ALTER DATABASE [P1_x3865181p] SET COMPATIBILITY_LEVEL = 120
  12. GO
  13. IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
  14. begin
  15. EXEC [P1_x3865181p].[dbo].[sp_fulltext_database] @action = 'enable'
  16. end
  17. GO
  18. ALTER DATABASE [P1_x3865181p] SET ANSI_NULL_DEFAULT OFF
  19. GO
  20. ALTER DATABASE [P1_x3865181p] SET ANSI_NULLS OFF
  21. GO
  22. ALTER DATABASE [P1_x3865181p] SET ANSI_PADDING OFF
  23. GO
  24. ALTER DATABASE [P1_x3865181p] SET ANSI_WARNINGS OFF
  25. GO
  26. ALTER DATABASE [P1_x3865181p] SET ARITHABORT OFF
  27. GO
  28. ALTER DATABASE [P1_x3865181p] SET AUTO_CLOSE ON
  29. GO
  30. ALTER DATABASE [P1_x3865181p] SET AUTO_SHRINK OFF
  31. GO
  32. ALTER DATABASE [P1_x3865181p] SET AUTO_UPDATE_STATISTICS ON
  33. GO
  34. ALTER DATABASE [P1_x3865181p] SET CURSOR_CLOSE_ON_COMMIT OFF
  35. GO
  36. ALTER DATABASE [P1_x3865181p] SET CURSOR_DEFAULT  GLOBAL
  37. GO
  38. ALTER DATABASE [P1_x3865181p] SET CONCAT_NULL_YIELDS_NULL OFF
  39. GO
  40. ALTER DATABASE [P1_x3865181p] SET NUMERIC_ROUNDABORT OFF
  41. GO
  42. ALTER DATABASE [P1_x3865181p] SET QUOTED_IDENTIFIER OFF
  43. GO
  44. ALTER DATABASE [P1_x3865181p] SET RECURSIVE_TRIGGERS OFF
  45. GO
  46. ALTER DATABASE [P1_x3865181p] SET  ENABLE_BROKER
  47. GO
  48. ALTER DATABASE [P1_x3865181p] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
  49. GO
  50. ALTER DATABASE [P1_x3865181p] SET DATE_CORRELATION_OPTIMIZATION OFF
  51. GO
  52. ALTER DATABASE [P1_x3865181p] SET TRUSTWORTHY OFF
  53. GO
  54. ALTER DATABASE [P1_x3865181p] SET ALLOW_SNAPSHOT_ISOLATION OFF
  55. GO
  56. ALTER DATABASE [P1_x3865181p] SET PARAMETERIZATION SIMPLE
  57. GO
  58. ALTER DATABASE [P1_x3865181p] SET READ_COMMITTED_SNAPSHOT OFF
  59. GO
  60. ALTER DATABASE [P1_x3865181p] SET HONOR_BROKER_PRIORITY OFF
  61. GO
  62. ALTER DATABASE [P1_x3865181p] SET RECOVERY SIMPLE
  63. GO
  64. ALTER DATABASE [P1_x3865181p] SET  MULTI_USER
  65. GO
  66. ALTER DATABASE [P1_x3865181p] SET PAGE_VERIFY CHECKSUM  
  67. GO
  68. ALTER DATABASE [P1_x3865181p] SET DB_CHAINING OFF
  69. GO
  70. ALTER DATABASE [P1_x3865181p] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
  71. GO
  72. ALTER DATABASE [P1_x3865181p] SET TARGET_RECOVERY_TIME = 0 SECONDS
  73. GO
  74. ALTER DATABASE [P1_x3865181p] SET DELAYED_DURABILITY = DISABLED
  75. GO
  76. USE [P1_x3865181p]
  77. GO
  78. /****** Object:  Table [dbo].[HOSPITAL]    Script Date: 15/10/2019 14:10:35 ******/
  79. SET ANSI_NULLS ON
  80. GO
  81. SET QUOTED_IDENTIFIER ON
  82. GO
  83. SET ANSI_PADDING ON
  84. GO
  85. CREATE TABLE [dbo].[HOSPITAL](
  86.     [HOSPITAL_COD] [int] NOT NULL,
  87.     [NOMBRE] [varchar](50) NULL,
  88.     [DIRECCION] [varchar](50) NULL,
  89.     [TELEFONO] [varchar](50) NULL,
  90.     [NUM_CAMA] [int] NULL,
  91.  CONSTRAINT [PK_HOSPITAL] PRIMARY KEY CLUSTERED
  92. (
  93.     [HOSPITAL_COD] ASC
  94. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  95. ) ON [PRIMARY]
  96.  
  97. GO
  98. SET ANSI_PADDING OFF
  99. GO
  100. /****** Object:  Table [dbo].[PLANTILLA]    Script Date: 15/10/2019 14:10:35 ******/
  101. SET ANSI_NULLS ON
  102. GO
  103. SET QUOTED_IDENTIFIER ON
  104. GO
  105. SET ANSI_PADDING ON
  106. GO
  107. CREATE TABLE [dbo].[PLANTILLA](
  108.     [HOSPITAL_COD] [int] NOT NULL,
  109.     [SALA_COD] [int] NOT NULL,
  110.     [EMPLEADO_NO] [int] NOT NULL,
  111.     [APELLIDOS_NOMBRE] [varchar](50) NULL,
  112.     [FUNCION] [varchar](50) NULL,
  113.     [TURNO] [varchar](1) NULL,
  114.     [SALARIO] [money] NULL,
  115.  CONSTRAINT [PK_PLANTILLA] PRIMARY KEY CLUSTERED
  116. (
  117.     [EMPLEADO_NO] ASC
  118. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  119. ) ON [PRIMARY]
  120.  
  121. GO
  122. SET ANSI_PADDING OFF
  123. GO
  124. /****** Object:  Table [dbo].[SALA]    Script Date: 15/10/2019 14:10:35 ******/
  125. SET ANSI_NULLS ON
  126. GO
  127. SET QUOTED_IDENTIFIER ON
  128. GO
  129. SET ANSI_PADDING ON
  130. GO
  131. CREATE TABLE [dbo].[SALA](
  132.     [HOSPITAL_COD] [int] NOT NULL,
  133.     [SALA_COD] [int] NOT NULL,
  134.     [NOMBRE] [varchar](50) NULL,
  135.     [NUM_CAMA] [int] NULL,
  136.  CONSTRAINT [PK_SALA] PRIMARY KEY CLUSTERED
  137. (
  138.     [HOSPITAL_COD] ASC,
  139.     [SALA_COD] ASC
  140. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  141. ) ON [PRIMARY]
  142.  
  143. GO
  144. SET ANSI_PADDING OFF
  145. GO
  146. ALTER TABLE [dbo].[PLANTILLA]  WITH CHECK ADD FOREIGN KEY([HOSPITAL_COD])
  147. REFERENCES [dbo].[HOSPITAL] ([HOSPITAL_COD])
  148. GO
  149. ALTER TABLE [dbo].[SALA]  WITH CHECK ADD FOREIGN KEY([HOSPITAL_COD])
  150. REFERENCES [dbo].[HOSPITAL] ([HOSPITAL_COD])
  151. GO
  152. USE [master]
  153. GO
  154. ALTER DATABASE [P1_x3865181p] SET  READ_WRITE
  155. GO
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top