0% found this document useful (0 votes)
81 views1 page

Case Study 1

The document outlines steps to create an "OrganizationEmployee" database with "Employee" and "Department" tables, including defining columns with specific data types and constraints. It also specifies inserting sample data into the "Employee" table and linking the tables with a foreign key, with the goal of writing a query to retrieve common values from both tables.

Uploaded by

Vijay Rajendiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views1 page

Case Study 1

The document outlines steps to create an "OrganizationEmployee" database with "Employee" and "Department" tables, including defining columns with specific data types and constraints. It also specifies inserting sample data into the "Employee" table and linking the tables with a foreign key, with the goal of writing a query to retrieve common values from both tables.

Uploaded by

Vijay Rajendiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Create database named “OrganizationEmployee”


2. Create a table named “Employee” with
EmployeeID – data type should be int and ensure not null constraint and should be primary
key
FirstName – data type should be varchar and the column should allow only 5 characters.
Department – data type should be varchar and the column should allow only 10 characters.
Salary – data type should be decimal, and the number should have 2 digits before the
decimal point and 2 digits after the decimal point.
3. Insert 5 values inside the table.
4. Create a table named “Department” with
Department ID – data type should be int
Department name – data type should be varchar
EmployeeID – provide foreign key
5. Create a query to fetch common values from both tables.

You might also like