Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions