建立view的最快方法

tjuan2001發表於2009-04-08

到了專案最後的衝刺階段,常有檢經常需要給大家建立view,包含12個類目,一個一個欄位寫會累死的,我用偷懶的方法,呵呵,用adk_price.*搞定

CREATE OR REPLACE VIEW all_adk_price AS
(((((((((( SELECT adk_price.*
FROM bijiben.adk_price
UNION ALL
SELECT adk_price.*
FROM caizhuang.adk_price)
UNION ALL
SELECT adk_price.*
FROM cunchu.adk_price)
UNION ALL
SELECT adk_price.*
FROM dianqi.adk_price)
UNION ALL
SELECT adk_price.*
FROM meirong.adk_price)
UNION ALL
SELECT adk_price.*
FROM mpn.adk_price)
UNION ALL
SELECT adk_price.*
FROM shouji.adk_price)
UNION ALL
SELECT adk_price.*
FROM taishiji.adk_price)
UNION ALL
SELECT adk_price.*
FROM wenju.adk_price)
UNION ALL
SELECT adk_price.*
FROM xiangji.adk_price)
UNION ALL
SELECT adk_price.*
FROM yingjian.adk_price)
UNION ALL
SELECT adk_price.*
FROM yinxiang.adk_price;

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7405970/viewspace-1020172/,如需轉載,請註明出處,否則將追究法律責任。

相關文章