Learn T-SQL Commands with Samples
Skip Navigation Links
Skip Navigation Links.
Expand DatabaseDatabase
Collapse TableTable
Expand ViewView
Expand Stored ProcedureStored Procedure
Expand Data FilteringData Filtering
Expand Data GroupingData Grouping
Expand JoinsJoins
Expand TriggerTrigger
Expand CursorCursor
Expand OperatorsOperators
Expand ConstraintsConstraints
Expand FunctionsFunctions
Expand Conditional ProcessingConditional Processing
Expand LoopingLooping
Expand Error HandlingError Handling
Expand v.IMP Queriesv.IMP Queries
Expand XMLXML
Expand Query PerformanceQuery Performance
Expand QueriesQueries
Expand NormalizationNormalization
Expand CreateCreate
     

Drop Table

 
      IF EXISTS (
      SELECT *
      FROM  sys.tables
      JOIN  sys.schemas
      ON    sys.tables.schema_id  = sys.schemas.schema_id
      WHERE sys.schemas.name      = N'dbo'
      AND   sys.tables.name       = N'myTable'
      )


      DROP TABLE dbo.myTable
      GO