Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Working with Views

Updated on 2022-08-16 GMT+08:00

Views can be created to restrict access to specific rows or columns of a table. A view can be created from one or more tables and is determined by the query used to create the view.

You can perform the following operations on an existing view:

Exporting the View DDL

Follow the steps below to export view the DDL:

  1. Right-click the selected view and select Export DDL.

    The Data Studio Security Disclaimer dialog box is displayed.

  2. Click OK.

    The Save As dialog box is displayed.

  3. In the Save As dialog box, select the location to save the DDL and click Save. The status bar displays the progress of the operation.

    NOTE:
    • To cancel the export operation, double-click the status to open the Progress View tab and click .
    • The exported file name will not be the same as the view name, if the view name contains characters which are not supported by Windows.
    • Multiple objects can be selected to export the view DDL. Refer to Batch Export for the list of the objects that are not supported for exporting view DDL.

    The Export message and status bar display the status of the completed operation.

    Database Encoding

    File Encoding

    Supports Exporting DDL

    UTF-8

    UTF-8

    Yes

    GBK

    Yes

    LATIN1

    Yes

    GBK

    GBK

    Yes

    UTF-8

    Yes

    LATIN1

    No

    LATIN1

    LATIN1

    Yes

    GBK

    No

    UTF-8

    Yes

Dropping a View

Individual or batch dropping can be performed on views. Refer to Batch Dropping Objects for batch dropping.

Follow the steps below to drop the view:

  1. Right-click the selected view and select Drop View.

    The Drop View dialog box is displayed.

  2. Click Yes to drop the view.

    The status bar displays the status of the completed operation.

Dropping a View Cascade

Follow the steps below to drop a view and its dependent database objects:

  1. Right-click the selected view and select Drop View Cascade.

    The Drop View dialog box is displayed.

  2. Click Yes to drop the view and its dependent database objects.

    The status bar displays the status of the completed operation.

Renaming a View

Follow the steps below to rename a view:

  1. Right-click the selected view and select Rename View.

    The Rename View dialog box is displayed.

  2. Enter the required name for the view and click OK. You can view the renamed view in the Object Browser.

    The status bar displays the status of the completed operation.

Setting the Schema for a View

Follow the steps below to set the schema for a view:

  1. Right-click the selected view and select Set Schema.

    The Set Schema dialog box is displayed.

  2. Select the required schema from the drop-down list and click OK.

    The status bar displays the status of the completed operation.

    If the required schema contains a view with the same name as the current view, then Data Studio does not allow setting the schema for the view.

Viewing the DDL

Follow the steps below to view the DDL of the view:

  1. Right-click the selected view and select Show DDL.

    The DDL is displayed in a new SQL Terminal tab. You must refresh the Object Browser to view the latest DDL.

Setting the Default Value for the View Column

Follow the steps below to set the default value for a column in the view:

  1. Right-click the selected column name under the view and select Set View Column Default Value.

    A dialog box with the current default value (if it is set) is displayed which prompts you to provide the default value.

  2. Enter the value and click OK.

    Data Studio displays the status of the operation in the status bar.

Viewing the Properties of a View

Follow the steps below to view the properties of the View:

  1. Right-click the selected View and select Properties.

    The properties (General and Columns) of the selected View is displayed in different tabs.

    NOTE:

    If the property of a View is modified that is already opened, then refresh and open the properties of the View again to view the updated information on the same opened window.

Granting/Revoking a Privilege

Follow the steps below to grant/revoke a privilege:

  1. Right-click the selected view and select Grant/Revoke.

    The Grant/Revoke dialog box is displayed.

  2. Refer to Granting/Revoking a Privilege to grant/revoke privilege.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback