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 / xyz

aLTER TABLE emp ADD CONSTRAINT C3 CHECK (EMPNO < 300)

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we know the count/number of elements of an array? : Sql dba

568


Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints

640


Write a query to display the current date in sql?

511


What is the difference between instead of trigger and after trigger?

508


What is an inconsistent dependency?

579






Can you have a foreign key without a primary key?

507


What is optimistic concurrency control? : Transact sql

544


how to rename an existing column in a table? : Sql dba

509


How many commands are there in sql?

545


- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?

1384


explain normalization concept? : Sql dba

584


Are sql database names case sensitive?

495


Is it possible for a table to have more than one foreign key?

580


What is synonyms?

570


How do you write an index?

524