Monday, May 26, 2008

Define a Variable List

Define Dept_List = "20,30"

Select *
From Dept
Where Deptno in (&Dept_list);

old 3: Where Deptno in (&Dept_list)
new 3: Where Deptno in (20,30)

DEPTNO DNAME LOC
---------- -------------- -------------
20 RESEARCH DALLAS
30 SALES CHICAGO

No comments:

Post a Comment