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:

Create a T-SQL script that will create 2 tables in Payroll Database.

PLEASE PROVIDE: a. T-SQL Script of 2 tables

b. Screenshot of 2 tables in MS SQL Server Management Studio showing columns folder, keys folder, constraints folder Example of the screenshot is provided on the question

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 Triggers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!