you can add a validation
Type = "No rows returned"
SQL Query = "select 1 from emp where empno = :EMPNO"
Error Message = "EMPNO already exists!"
This really should be enforced at the DB level with either a primary key or unique index.
Thanks for your time. your suggestion work fine when i try to enter only one value say empno=101 and save. The new Empno=101 will check in database if it exists it will validate and through message. Suppose if i enter Empno=105 and with out saving if i press Add_Row and again Empno=105 and save it will accept. since there is no 105 in database. 105 got duplicated. Can we do client level validation for this.
as Pmon suggested you should enforce uniqueness first of all in the database.
APEX-validations are additional checks that give a more userfriendly error to the enduser.
you can do it on client side by using setCustomVailidity which is driven by a database process.
i have the same requirement to check for uniqueness before saving the data
see this thread: