Andrew Kerber wrote:
This is not to undermine what Andrew said. Andrew's answer is good answer but it skips null values as you see it below.try ... where blah_col=blah_col (just put the column name in the & variable).
SQL> create table my_emp(empno number , empcatg varchar(1)); Table created. SQL> insert into my_emp values(1, 'A'); 1 row created. SQL> insert into my_emp values(2, 'B'); 1 row created. SQL> select * from my_emp where empcatg=&blah; Enter value for blah: empcatg old 1: select * from my_emp where empcatg=&blah new 1: select * from my_emp where empcatg=empcatg EMPNO E ---------- - 1 A 2 B SQL> update my_emp set empcatg=null where empno > 1; 1 row updated. SQL> select * from my_emp where empcatg=&blah; Enter value for blah: empcatg old 1: select * from my_emp where empcatg=&blah new 1: select * from my_emp where empcatg=empcatg EMPNO E ---------- - 1 A SQL> HTH GovindanK -- //www.freelists.org/webpage/oracle-l