DROP SHARE

Preview

Delta Sharing is in Public Preview. To participate in the preview, you must enable the External Data Sharing feature group in the Databricks Account Console. See Enable the External Data Sharing feature group for your account.

Delta Sharing is subject to applicable terms. Enabling the External Data Sharing feature group represents acceptance of those terms.

Drops a share. An exception is thrown if the share does not exist in the system.

Since: Databricks Runtime 10.3

Syntax

DROP SHARE [ IF EXISTS ] share_name

Parameters

  • IF EXISTS

    If specified, no exception is thrown when the share does not exist.

  • share_name

    The name of an existing share. If the name does not exist, an exception is thrown.

Examples

-- Create `vaccine` share
> CREATE SHARE vaccine COMMENT 'This share is used to share information about vaccines';

-- Drop the share
> DROP SHARE vaccine;

-- Drop the share using IF EXISTS.
> DROP SHARE IF EXISTS vaccine;