kylecharlesbotha / SEN381-Project

Software Engineering 381 Project/Belgium Campus
0 stars 0 forks source link

Create tblCustomerContract #9

Closed kylecharlesbotha closed 3 years ago

kylecharlesbotha commented 3 years ago

Please create tblCustomerContract

tblCustomerContract should have the following fields

  • CustomerContractID
  • BusinessID
  • ClientID
  • ContractID
  • CustomerContractStatus
  • StartDate
  • EndDate

Please use the correct naming conventions and best practices for SQL, for example

  • Prefix table names with "tbl" for example, tblEmployee
  • Prefix each field name with the table name
  • Ensure that important fields cannot be left null
  • Ensure that there is a auto-increment in each the table
ZanePretorius commented 3 years ago

done this np

USE Premier_Service_Solutions
GO

/****** Object:  Table [dbo].[tblCustomerContract]    Script Date: 2021/03/18 08:54:31 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE tblCustomerContract(
    CustomerContractID int PRIMARY KEY NOT NULL,
    BusinessID int FOREIGN KEY REFRENCES tblBusiness(BusinessID)  NOT NULL,
    ClientID int FOREIGN KEY REFRENCES tblClient(ClientID) NOT NULL,
    ContractID int FOREIGN KEY REFRENCES tblContract(ContractID) NOT NULL,
    CustomerContractStatus varchar(50) NOT NULL,
    StartDate date NOT NULL,
    EndDate nchar(10) NOT NULL,
)