select * from dept where deptno in ( '10','20','30');Now I want to declare one vaibale to hold that string let us say declare dept_string = '10','20','30'. Create variable as follows,
define dept_string = '(''10'',''20'',''30'')';
OR
define dept_string = "('10','20','30')";
select * from dept where deptno in &deptnoThe above query will give the desired result.
No comments:
Post a Comment