how do you restrict number of rows for a particular value
in a column.For example:there is a table called
fruits,having apples,bananas ,papayas.I dont want to have
more than 100 apples in that table ,so how can u restrict
number of rows for apple to hundred?

Answer Posted / suresh babu

create check constraint is the best way to restrict the
limited number of entries,because the constraint won't take
a separate space,but Trigger required separate memory
space.perhaps the trigger got error,it would affect all
entries in table.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is equi join in sql?

608


what is foreign key? : Sql dba

585


How to fetch alternate records from a table?

675


What is the difference between nvl function, ifnull function, and isnull function?

587


How to write html code in pl sql?

580






What is mutating sql table?

608


What is a .db file?

538


Write a query to find the names of users that begin with "um" in sql?

501


What is the difference between in and between in sql?

574


Can I create table without primary key?

527


what is difference between delete and truncate commands? : Sql dba

575


What is difference between inner join and self join?

588


What is clause?

608


What are the triggers associated with image items?

617


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

556