Soal QT 2
Soal QT 2
What value will appear in the product_name column of the product_lookup table?
Mobiles
10. If an error occurs in the INSERT statement of Studentinfo, records inserted onto
student_teacher and StudentFee should be commited.
If an error occurs in the INSERT statement of StudentFee, all transaction shoul be rolled
back.
Enclose all statement of IncludeStudentDetail in a TRY/CATCH
Add rollback transaction statement in the catch block
11. The Check Constraint is applied on the LeaveType column of the EmployeeLeave table. This
Check constraint allows only the values CL, SL, and PL in the LeaveType column. You need
to insert a record in the LeaveType column for maternity leave. For this, you have to specify
ML in the LeaveType column. But the constraint applied on the column contradicts this
requirement What should yo do to allow the insertion of ML as a value in the LeaveType
column in some special cases?
You should disable the check constraint on the LeaveType column
using the NOCHECK CONSTRAINT clause.
Insert a record with the ML leave type value.
Then, you should enable the check constraint on the LeaveType column using the
CHECK CONSTRAINT
12. The data in the table database tables is stored in the form of?
Data pages
13. SELECT Product_ID, Product_Description FROM Product_AssemblyProcess WHERE
Product_Description CONTAINS (*,’ “HIGH and STRENGTH)
What will be returned in the result set of the preceding query?
The product_id and product_description values for all those rows that contain both the
words, HIGH and STRENGTH are returned.
14. Which symbol is used to declare a variable in a batch in SQL Server?
@ (SQL 2 Hal 7.4)
15. You work in a company named Raisy_corp. The company uses SQL Server. You are the
administrator of the company database named Prod_sales. You need to enable change
tracking on the Products table under the schema named Prod. What are the steps you need to
perform to achieve the same?
USE Prod_Sales
ALTER DATABASE Prod_Sales SET CHANGE_TRACKING ON
GO
ALTER TABLE Prod_Sales.Products ENABLE CHANGE_TRACKING