How can i give the restrictions for the data entry, if i
wish to enter only I ,II, III, IV in the grade actegory of
student table?
Answer Posted / mohan
create table #test (sno int check(sno in(1,2,3)))
successfull statement:
insert into #test values(3)
failure statement :
insert into #test values(4)
error message:
INSERT statement conflicted with COLUMN CHECK
constraint 'CK__#test__sno__68E599B5'. The conflict
occurred in database 'tempdb',
table '#test________________________________________________
____________________________________________________________
___00000000D7E0', column 'sno'.
The statement has been terminated.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is foreign key a primary key?
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?
What information is maintained within the msdb database?
Explain the ways to controlling cursor behavior?
Does order by actually change the order of the data in the tables or does it just change the output?
How can we delete Duplicate row in table?
what is a join? : Sql server database administration
What are data files?
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.
List the types of recovery model available in sql server?
What is constraints and its types?
what are the core components of SSRS?
What does truncate do?
do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration