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

Is foreign key a primary key?

1087


List layers of abstraction microsoft architectured to provide relational db through cloud platform ?

183


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?

1071


What information is maintained within the msdb database?

976


Explain the ways to controlling cursor behavior?

917


Does order by actually change the order of the data in the tables or does it just change the output?

1146


How can we delete Duplicate row in table?

1066


what is a join? : Sql server database administration

1246


What are data files?

1039


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.

2071


List the types of recovery model available in sql server?

928


What is constraints and its types?

949


what are the core components of SSRS?

129


What does truncate do?

934


do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

988