USE [master] GO /****** Object: Database [etude] Script Date: 03/07/2016 10:36:35 ******/ CREATE DATABASE [etude] ON PRIMARY ( NAME = N'etude', FILENAME = N'D:\DATA\MSSQL\DATA\etude.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'etude_log', FILENAME = N'D:\DATA\MSSQL\LOG\etude_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) GO ALTER DATABASE [etude] SET COMPATIBILITY_LEVEL = 100 GO IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) begin EXEC [etude].[dbo].[sp_fulltext_database] @action = 'enable' end GO ALTER DATABASE [etude] SET ANSI_NULL_DEFAULT OFF GO ALTER DATABASE [etude] SET ANSI_NULLS OFF GO ALTER DATABASE [etude] SET ANSI_PADDING OFF GO ALTER DATABASE [etude] SET ANSI_WARNINGS OFF GO ALTER DATABASE [etude] SET ARITHABORT OFF GO ALTER DATABASE [etude] SET AUTO_CLOSE OFF GO ALTER DATABASE [etude] SET AUTO_CREATE_STATISTICS ON GO ALTER DATABASE [etude] SET AUTO_SHRINK OFF GO ALTER DATABASE [etude] SET AUTO_UPDATE_STATISTICS ON GO ALTER DATABASE [etude] SET CURSOR_CLOSE_ON_COMMIT OFF GO ALTER DATABASE [etude] SET CURSOR_DEFAULT GLOBAL GO ALTER DATABASE [etude] SET CONCAT_NULL_YIELDS_NULL OFF GO ALTER DATABASE [etude] SET NUMERIC_ROUNDABORT OFF GO ALTER DATABASE [etude] SET QUOTED_IDENTIFIER OFF GO ALTER DATABASE [etude] SET RECURSIVE_TRIGGERS OFF GO ALTER DATABASE [etude] SET DISABLE_BROKER GO ALTER DATABASE [etude] SET AUTO_UPDATE_STATISTICS_ASYNC OFF GO ALTER DATABASE [etude] SET DATE_CORRELATION_OPTIMIZATION OFF GO ALTER DATABASE [etude] SET TRUSTWORTHY OFF GO ALTER DATABASE [etude] SET ALLOW_SNAPSHOT_ISOLATION OFF GO ALTER DATABASE [etude] SET PARAMETERIZATION SIMPLE GO ALTER DATABASE [etude] SET READ_COMMITTED_SNAPSHOT OFF GO ALTER DATABASE [etude] SET HONOR_BROKER_PRIORITY OFF GO ALTER DATABASE [etude] SET READ_WRITE GO ALTER DATABASE [etude] SET RECOVERY FULL GO ALTER DATABASE [etude] SET MULTI_USER GO ALTER DATABASE [etude] SET PAGE_VERIFY CHECKSUM GO ALTER DATABASE [etude] SET DB_CHAINING OFF GO USE [etude] GO /****** Object: Table [dbo].[test] Script Date: 03/07/2016 10:36:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[test]( [pno] [int] NULL, [qute] [int] NULL ) ON [PRIMARY] GO INSERT [dbo].[test] ([pno], [qute]) VALUES (102, 1) INSERT [dbo].[test] ([pno], [qute]) VALUES (103, 2) INSERT [dbo].[test] ([pno], [qute]) VALUES (105, 3) INSERT [dbo].[test] ([pno], [qute]) VALUES (108, 1) /****** Object: Table [dbo].[produits] Script Date: 03/07/2016 10:36:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[produits]( [pno] [int] NULL, [design] [nchar](10) NULL, [prix] [int] NULL, [poids] [int] NULL, [couleur] [nchar](10) NULL ) ON [PRIMARY] GO INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (102, N'fauteuil ', 1500, 9, N'rouge ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (103, N'bureau ', 3500, 30, N'vert ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (101, N'fauteuil ', 2000, 7, N'gris ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (105, N'armoire ', 2500, 35, N'rouge ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (104, N'bureau ', 4000, 40, N'gris ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (107, N'caisson ', 1000, 12, N'jaune ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (106, N'caisson ', 1000, 12, N'gris ') INSERT [dbo].[produits] ([pno], [design], [prix], [poids], [couleur]) VALUES (108, N'classeur ', 1500, 20, N'bleu ') /****** Object: Table [dbo].[petites_commandes] Script Date: 03/07/2016 10:36:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[petites_commandes]( [pno] [int] NULL, [qute] [int] NULL ) ON [PRIMARY] GO INSERT [dbo].[petites_commandes] ([pno], [qute]) VALUES (102, 1) INSERT [dbo].[petites_commandes] ([pno], [qute]) VALUES (103, 2) INSERT [dbo].[petites_commandes] ([pno], [qute]) VALUES (105, 3) INSERT [dbo].[petites_commandes] ([pno], [qute]) VALUES (108, 1) /****** Object: Table [dbo].[fournisseurs] Script Date: 03/07/2016 10:36:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[fournisseurs]( [fno] [int] NULL, [nom] [nchar](10) NULL, [adresse] [nchar](10) NULL, [ville] [nchar](10) NULL ) ON [PRIMARY] GO INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (10, N'dupont ', NULL, N'lille ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (15, N'durand ', NULL, N'lille ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (17, N'lefebvre ', NULL, N'lille ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (12, N'jacquet ', NULL, N'lyon ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (14, N'martin ', NULL, N'nice ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (13, N'durand ', N'rue du p ', N'lyon ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (11, N'martin ', NULL, N'amiens ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (19, N'maurice ', NULL, N'paris ') INSERT [dbo].[fournisseurs] ([fno], [nom], [adresse], [ville]) VALUES (16, N'dupont ', NULL, N'paris ') /****** Object: Table [dbo].[commandes] Script Date: 03/07/2016 10:36:36 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[commandes]( [cno] [int] NULL, [fno] [int] NULL, [pno] [int] NULL, [qute] [int] NULL ) ON [PRIMARY] GO INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (8, 17, 103, 55) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1003, 15, 103, 2) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1005, 17, 102, 40) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1007, 15, 108, 1) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1011, 19, 107, 12) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1013, 13, 107, 5) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1017, 19, 105, 3) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1019, 14, 103, 10) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1023, 10, 102, 51) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1029, 17, 108, 58) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1030, 17, 101, 2) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1031, 17, 104, 3) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1032, 17, 105, 4) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1033, 17, 106, 5) INSERT [dbo].[commandes] ([cno], [fno], [pno], [qute]) VALUES (1034, 17, 107, 6) /****** Object: Synonym [dbo].[cmd] Script Date: 03/07/2016 10:36:36 ******/ CREATE SYNONYM [dbo].[cmd] FOR [commandes] GO /****** Object: Synonym [dbo].[fr] Script Date: 03/07/2016 10:36:36 ******/ CREATE SYNONYM [dbo].[fr] FOR [fournisseurs] GO /****** Object: Synonym [dbo].[pr] Script Date: 03/07/2016 10:36:36 ******/ CREATE SYNONYM [dbo].[pr] FOR [produits] GO