1.临时表
表名#temp
if   object_id('tempdb.#temp')   is   not   null
    select 'exist'

2.普通表
表名Temp
if exists(select * from sysobjects where id = object_id(N'[dbo].[Temp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    select 'exist'

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-06-01
  • 2021-12-07
  • 2022-02-05
猜你喜欢
  • 2021-12-27
  • 2022-02-02
  • 2021-09-26
  • 2021-12-29
  • 2021-12-15
  • 2022-01-04
相关资源
相似解决方案