0% found this document useful (0 votes)
61 views2 pages

SQLServer Lab 8

The document outlines a series of SQL tasks involving the creation and modification of views in SQL Server using specified databases. It includes instructions for creating views that filter and display specific data, as well as implementing security measures and indexing. Additionally, it covers operations such as merging tables and modifying existing views to meet new requirements.
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)
61 views2 pages

SQLServer Lab 8

The document outlines a series of SQL tasks involving the creation and modification of views in SQL Server using specified databases. It includes instructions for creating views that filter and display specific data, as well as implementing security measures and indexing. Additionally, it covers operations such as merging tables and modifying existing views to meet new requirements.
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/ 2

SQLServer Lab

Note: Use ITI DB


1. Create a view that displays student full name, course name if the
student has a grade more than 50.

2. Create an Encrypted view that displays manager names and the topics
they teach.

3. Create a view that will display Instructor Name, Department Name for
the ‘SD’ or ‘Java’ Department

4. Create a view “V1” that displays student data for student who lives in
Alex or Cairo.
Note: Prevent the users to run the following query
Update V1 set st_address=’tanta’
Where st_address=’alex’;
5. Create a view that will display the project name and the number of
employees work on it. “Use Company DB”
6. Create index on column (Hiredate) that allow u to cluster the data in
table Department. What will happen?
7. Create index that allow u to enter unique ages in student table. What will
happen?
8. Using Merge statement between the following two tables [User ID,
Transaction Amount]
Part2: use SD_DB
1) Create view named “v_clerk” that will display employee#,project#, the date of hiring of
all the jobs of the type 'Clerk'.

2) Create view named “v_without_budget” that will display all the projects data
without budget

3) Create view named “v_count “ that will display the project name and the # of jobs in it

4) Create view named ” v_project_p2” that will display the emp# s for the project# ‘p2’
use the previously created view “v_clerk”

5) modifey the view named “v_without_budget” to display all DATA in project p1 and p2

6) Delete the views “v_ clerk” and “v_count”

7) Create view that will display the emp# and emp lastname who works on dept# is ‘d2’
8) Display the employee lastname that contains letter “J”
Use the previous view created in Q#7

9) Create view named “v_dept” that will display the department# and department name
10) using the previous view try enter new department data where dept# is ’d4’ and dept name
is ‘Development’

11) Create view name “v_2006_check” that will display employee#, the project #where he
works and the date of joining the project which must be from the first of January and the
last of December 2006.this view will be used to insert data so make sure that the coming
new data must match the condition

You might also like