snow888 发表于 2009-07-30 16:44

db2 中如何使用select 语句创建临时表?

rt

lizhuo 发表于 2009-08-03 17:05

可以用类似写法:
with actlist as
    (select distinct his.ACCOUNT_IDfrom tabnamewhere date(his.trxDate) between '2008-1-1' and '2008-1-31' )
    select count(*) from tabname1 c, account a, actlist l where c.CUSTOMERTYPE='PERSON' and a.CUSTOMER_ID = c.ID and a.id = l.account_id

snow888 发表于 2009-08-10 12:28

谢谢!
页: [1]
查看完整版本: db2 中如何使用select 语句创建临时表?