Write a query to include a constraint, to check whether the employee salary is greater than 5000?



Write a query to include a constraint, to check whether the employee salary is greater than 5000?..

Answer / Rajnikanth

You can add a CHECK constraint in SQL Server to ensure that the employee salary is always greater than 5000. Here's an example: ALTER TABLE Employees ADD CONSTRAINT chk_salary CHECK (Salary > 5000)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are types of subqueries?

1 Answers  


Explain transaction isolation levels in sql server?

1 Answers  


What is bit data type?

1 Answers  


As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?

1 Answers  


what are the different types of replication you can set up in sql server? : Sql server database administration

1 Answers  


can an order by clause be used in a creation of a view?

1 Answers  


if 3 duplicate records in table,i want to delete 2 alternating duplicate records by keeping 1 duplicate and 1 original as it is,how?

2 Answers  


Can we passed multiple recordset(set of records) using a Stored Procedure

2 Answers  


Which system table contains information on constraints on all the tables created?

2 Answers  


Explain the difference between HTTP and HTTPS in database?

1 Answers   Wipro,


Explain syntax for disabling triggers?

1 Answers  


How to skip remaining statements in a loop block using continue statements?

1 Answers  


Categories