DROP VIEW

적용 대상:체크 표시된 예 Databricks SQL 체크 표시된 예 Databricks Runtime

카탈로그에서 지정된 뷰와 연결된 메타데이터를 제거합니다. 보기를 삭제하려면 뷰에 대한 MANAGE 권한이 있어야 하며, 해당 소유자이거나 뷰가 상주하는 스키마, 카탈로그 또는 메타스토어의 소유자여야 합니다.

Unity Catalog 메트릭 뷰를 내려놓으면, Azure Databricks는 그 위에 선언된 관계(Beta)도 삭제합니다. 다른 메트릭 뷰에서 드롭된 메트릭 뷰로의 관계는 더 이상 또는 에 나타나 DESCRIBE TABLE EXTENDEDINFORMATION_SCHEMA.TABLE_CONSTRAINTS지 않습니다.

구문

DROP [ MATERIALIZED ] VIEW [ IF EXISTS ] view_name

매개 변수

예제

-- Assumes a view named `employeeView` exists.
> DROP VIEW employeeView;

-- Assumes a view named `employeeView` exists in the `usersc` schema
> DROP VIEW usersc.employeeView;

-- Assumes a view named `employeeView` does not exist.
-- Throws TABLE_OR_VIEW_NOT_FOUND
> DROP VIEW employeeView;
  [TABLE_OR_VIEW_NOT_FOUND]

-- Assumes a materialized view named `employeeView` exists.
> DROP MATERIALIZED VIEW employeeView

-- Assumes a view named `employeeView` does not exist. Try with IF EXISTS
-- this time it will not throw exception
> DROP VIEW IF EXISTS employeeView;