0

I am trying the following code to drop a table in Azure Synapse

drop dbo.tablename

drop tablename

enter image description here

But I keep on getting errors such as:

Unknown object type 'ts_originationopportunity' used in a CREATE, DROP, or ALTER statement.

Or

Unknown object type 'dbo' used in a CREATE, DROP, or ALTER statement.

enter image description here

Can someone let me know what is the correct syntax to drop a table in Azure Synapse Serverless Builtin Pool please

Patterson
  • 1,927
  • 1
  • 19
  • 56

2 Answers2

1

Please note, Synapse has two types of SQL. One is dedicated SQL Pool and another one is Serverless SQL Pool.

Dedicated SQL Pools will contain tables & external tables. Where as serverless SQL Pool has only external tables.

To drop table use syntax as DROP TABLE table_name. To drop external table use syntax as DROP EXTERNAL TABLE table_name

Below are screenshots of same for better understanding. enter image description here enter image description here

ShaikMaheer
  • 137
  • 4
0

This worked for me .

use [your DatabaseName] 
GO 
drop EXTERNAL table schemaname.tablename
HimanshuSinha
  • 1,650
  • 2
  • 6
  • 10