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
How ssrs maintain security?
How column data types are determined in a view?
How to enforce security in sql server? : sql server security
Define right outer join in sql server joins?
What are the 2 types of classifications of constraints in the sql server?
What do you understand by integration services in sql server?
Explain the properties of the relational tables?
What is a primary key?
Mention the differences between local and global temporary tables.
What is difference in performance between insert top (n) into table and using top with insert?
What is table-valued sub query?
What is the correct order of the logical query processing phases?
What are the parts of a function?
What is default constraint in ms sql server?
How to concatenate two strings in SQL Server.