Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to check parameter value in stored procedure sql server?

958


Does partitioning help performance?

918


What is delete query?

923


Explain the use of keyword with encryption. Create a store procedure with encryption?

933


Give a example to search fr a string in all stored procedure in sql server.

963


Which command is used for user defined error messages?

1050


What is data compression?

972


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

1017


How to insert a new row into a table with "insert into" statements in ms sql server?

951


Introduction of rollup clause using sum and group by clause?

936


What are the different types of Indexes available in SQL Server?

980


Explain ranking functions?

1027


What is trigger explain with program?

961


Explain aggregate functions?

1062


Explain the properties of sub-query in sql server?

995