Skip to content

Commit

Permalink
inserted 0th values into person,employee and customer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Mill committed Nov 11, 2015
1 parent 1b9bc30 commit 7d29614
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Chinook_Rev1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,25 @@ ALTER TABLE `Invoice` ADD CONSTRAINT `FK_PayId`

CREATE INDEX `IFK_PayId` ON `Invoice` (`PayId`);

/*******************************************************************************
Change a SQL variable and insert some 0 rows to the BLANK value
********************************************************************************/
#this changes the default behavior on 0 being inserted
SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO';

#make a 0th person
insert into person(PersonID,LastName,FirstName,Address,City,State,PostalCode,Country,Phone,Fax,Email) VALUES
(0,"BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK");

#make a 0th employee
insert into employee(EmployeeId,Title,ReportsTo,BirthDate,HireDate,PersonID) VALUES
(0,"BLANK",NULL,NULL,NULL,0);

#make a 0th Customer
insert into customer(CustomerID,Company,SupportRepId,PersonID) VALUES
(0,NULL,0,0);





Expand Down
1 change: 1 addition & 0 deletions TeamDBAwesome/TeamDBAwesome/js/HolderService.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Fax: null,
Email: null,
Company: null,
//SUPPORT REP ID SHOULD BE 0 for NEW customer
SupportRepID: null,
PersonID: null,
CustomerID: null
Expand Down

0 comments on commit 7d29614

Please sign in to comment.