一、临时表
二、真实表
if object_id('tempdb.dbo.#otc_otherdeliverline') is not null drop table dbo.#otc_otherdeliverline
Select * into #otc_otherdeliverline from v_utis_CRMOtherDeliverLine
二、真实表
if object_id(N'#otc_otherdeliverline', N'u') is not null drop table #otc_otherdeliverline
Select * into #otc_otherdeliverline from v_utis_CRMOtherDeliverLine
本文介绍了如何在数据库中创建并填充临时表及真实表的方法。通过检查表是否存在,如果存在则先删除,然后从视图中选择所有数据来创建新表。此过程适用于需要临时存储数据或建立持久化数据表的场景。
1856

被折叠的 条评论
为什么被折叠?



