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
What does it mean to normalize a database and why would you do it?
what's the difference between delete table and truncate table commands? : Sql server database administration
How to change parameter value inside the report?
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.
Do you know sql server 2008 introduces automatic auditing?
What stored by the master? : sql server database administration
Does sql server 2000 clustering support load balancing?
What are magic tables in sql server?
What are views in ms sql server?
How to add an address record into adventureworkslt?
can an automatic recovery be initiated by a user? : Sql server administration
Is ssrs support other database except ms sql server?
What is inner join? Explain with an example?
How to turn on the mssql api module in php?
What is row-level compre?