Question
Create a T-SQL script that will create 2 tables in Payroll Database. First table: Tbl_Department_YourLastName Columns: Department_ID_YourLastName INT identity(1,1) not null Primary key (name of
Create a T-SQL script that will create 2 tables in Payroll Database.
First table:
Tbl_Department_YourLastName
Columns:
Department_ID_YourLastName INT identity(1,1) not null Primary key (name of constraint PK_DID)
Department_Name_YourLastName VARCHAR(30) not null
Phone_Number_YourLastName BIGINT not null
Second table:
Tbl_Employee_YourLastName
Columns:
Employee_ID_YourLastName INT identity(1,1) not null Primary key (name of constraint PK_EID)
First_Name_YourLastName VARCHAR(25) not null
Middle_Name_YourLastName VARCHAR(25) null
Last_Name_YourLastName VARCHAR(25) not null
Position_YourLastName VARCHAR(15) not null
Department_ID_YourLastName INT not null Foreign Key (name of constraint FK_DID, reference to Tbl_Department_YourLastName -> Department_ID_YourLastName)
Example:
pubs Database Diagrams Tables System Tables FileTables dbo.authors dbo.discounts employee Columns emp_d TPR empid(char(9), not null fname (varchar(20), not null minit(char(1), null) Iname (varchar(30), not null) job_id (FK, smallint, not null job_lv (tinyint, null) pub_id (FK char(4), not null) hire_date (datetime, not null) Keys 7 PK_emp.id FK_employee_job_id_34C80901 2. FK employee_pub_id_37A5467C Constraints CK_emp_id DF_employee_hire_d_38996AB5 01 DF_employee_job_id_33048598 DF_employee_job_l_35BCFEOA DF_employee_pub_id__36812243 TriggersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started