SQLServer Lab 8
SQLServer Lab 8
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
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