Junismo1245

Solo disponible en BuenasTareas
  • Páginas : 2 (261 palabras )
  • Descarga(s) : 0
  • Publicado : 4 de septiembre de 2012
Leer documento completo
Vista previa del texto
use BDCOMERCIAL
CREATE TABLE [dbo].[OFERTA](
[ID][int] NOT NULL PRIMARY KEY,
[PROVINCIA][varchar](50) NOT NULL,
[DIRECCION][VARCHAR](50) NOT NULL,
[tipo][varchar](50) NOTNULL,
[PRECIO][int] NOT NULL
) ON[PRIMARY]

DROP TABLE OFERTA
GO
CREATE TABLE [DBO].[comunidadautoinoma]
(
[CA.ID][int] NOT NULL PRIMARY KEY,
[CA.NOMBRE][VARCHAR](50)NOT NULL
)ON[PRIMARY]
GO
CREATE TABLE[dbo].[OFERTA]
(
[ID][int][dbo].[OFERTA] PRIMARY KEY,
[prov.ID][int] NOT NULL,
[DIRECCION][VARCHAR](50) NOT NULL,
[TB.ID][int] NOTNULL,
[TRASMISION][VARCHAR](50) NOT NULL,
[PRECIO][int]NOT NULL
)
GO
CREATE TABLE [dbo].[Provincia](
[prov.id][int] NOT NULL PRIMARY KEY,
[CA.ID][int] NOT NULL,[PROV.NOMBRE][VARCHAR](50)NOT NULL,
)ON [PRIMARY]
GO
CREATE TABLE [dbo].[tipoBEN](
[TB_NOMBRE][VARCHAR](50) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE[dbo].[comercial]([COM_NIF][CHAR](10) NOT NULL PRIMARY KEY,
[COM_NOMBRE][VARCHAR](50) NOT NULL,
[COM_APELLIDO][VARCHAR](50) NOT NULL,
[COM_APELLIDOS][VARCHAR](50) NOT NULL,
[COM_CODPOSTAL][VARCHAR](5)NOT NULL,
[PROV_ID][int] NOT NULL,
[COM_TELEFONO][CHAR](9) NOT NULL,
[COM_CATEGORIA][VARCHAR](10) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [DBO].[CLIENTE](
[CLI_NIF][CHAR]NOT NULL PRIMARY KEY,
[CLI_NOMBRE][VARCHAR](59) NOT NULL,
[CLI_APELIDOS][VARCHAR](50) NOT NULL,
[CLI_DIRECCION][VARCHAR](50) NOT NULL,
[CLI_COD POSTAL][char](5) NOT NULL[PROV_ID][int]NOT NULL,
[cli_ccc][varchar](30) not null
)on [primary]
go
create table [dbo].[tipo tRANSPORTE](
[TT_ID][int] not null primary key,
[tt_nombre][varchar](50) notnull
) on [primary]
go
CREATE TABLE [dbo].[transporte](
[tr_ID][int] NOT NULL PRIMARY KEY,
[TR_NOMBRE][VARCHAR](30) NOT NULL,
[TT_ID][int] NOT NULL
)ON [PRIMARY]
GO
tracking img