tencent cloud

Overview of Standard Spark Statement
Last updated:2026-01-16 17:18:09
Overview of Standard Spark Statement
Last updated: 2026-01-16 17:18:09
The kernel of the Standard Spark Engine is self-developed based on Spark Version 3.2 and is compatible with native Spark syntax and behavior. For detailed syntax, please refer to the Spark documentation.

DDL Syntax

Database-related Syntax

Use
Syntax
New database
CREATE DATABASE
Display all databases in the Metadata Definition
SHOW DATABASES
View database attributes
DESCRIBE DATABASE
Database attribute changes
ALTER DATABASE SET DBPROPERTIES
Dropping a Database
DROP DATABASE

Data table related syntax

Use
Syntax
New Data Table
CREATE TABLE
Query Table Creation Information
SHOW CREATE TABLE
Query Table Attributes
SHOW TBLPROPERTIES
Query All Tables in Database
SHOW TABLES
View Data Table Column Information and Metadata
DESCRIBE TABLE
Add Column to Data Table
ALTER TABLE ADD COLUMNS
Add New Column to Data Table
ALTER TABLE ADD COLUMN AFTER/FIRST
Rename Field
ALTER TABLE ... RENAME COLUMN
Delete a Field from Data Table
ALTER TABLE DROP COLUMN
Add Partition Information to Data Table
ALTER TABLE ADD PARTITION
List Table Partitions
SHOW PARTITIONS
Delete Partition Information from Data Table
ALTER TABLE DROP PARTITION
Add Partition Field to Iceberg Table
ALTER TABLE ADD PARTITION FIELD
Delete Partition Field from Iceberg Table
ALTER TABLE DROP PARTITION FIELD
Data Table Attribute Changes
ALTER TABLE SET TBLPROPERTIES
Data Table Storage Location Changes
ALTER TABLE SET LOCATION
Modify Table Data Sorting Method
ALTER TABLE ... WRITE ORDERED BY
Modify Partition Table Allocation Policy
ALTER TABLE ... WRITE DISTRIBUTED BY PARTITION
Update Partition Information (Iceberg table version V2 is not supported.)
MSCK REPAIR TABLE
Delete Metadata Table
DROP TABLE
Display the logical or physical plan of executing SQL
EXPLAIN
Call table stored procedure
CALL STATEMENT

View-related syntax

Use
Syntax
Create a view from the select result
CREATE VIEW AS
Query views in the database
SHOW VIEWS
View column information of the view
DESCRIBE VIEW
Show view creation statement
SHOW CREATE VIEW
View column information of the view
SHOW COLUMNS IN VIEW
Modify view name
ALTER VIEW RENAME TO
Modify view attribute
ALTER VIEW SET TBLPROPERTIES
Delete View
DROP VIEW

Function related syntax

Use
Creating function
CREATE FUNCTION
View create function syntax
SHOW FUNCTION
Deleting function
DROP FUNCTION

DML Syntax

Use
Insert a row of data
INSERT STATEMENT
Replace a row of data
INSERT OVERWRITE
Row-level data update operation, which can be used to replace the INSERT OVERWRITE Operation
MERGE INTO
Iceberg Table Metadata Query
TABLE METADATA
Insert query results into a data table
INSERT INTO
Delete data from Iceberg Table
DELETE STATEMENT
Update specified row
UPDATE

DQL Syntax

Use
Data Query
SELECT STATEMENT

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback