[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Can we know a table exist?

When we create a table,we must know if it is exist.
When we drop a table,we must know if it is exist.
So how to know?
0
mathematics
Asked:
mathematics
1 Solution
 
bequetteCommented:
You can select from the sysobjects table try this
if exists(select * from sysobjects where name="MY_TABLE_NAME")

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now