Appendix: SQL Syntax（5）
Tags: opengauss
Published: 2023-03-10 08:25:18

**CREATE PROCEDURE**
Creates a stored procedure.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnfx0alfx6b5kklnm2s8.png)

**CREATE RESOURCE LABEL**
Creates a resource label.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inatriie74ck0pv93jdu.png)

**CREATE ROLE**
Creates a role.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2kg1uf0qnjmk40j8od3.png)

**CREATE ROW LEVEL SECURITY POLICY**
Creates a row-level access control policy for a table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e3gbo246cao1qdd5s13z.png)

**CREATE SCHEMA**
Creates a schema.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gd2okrix4lx9wt26he7c.png)

**CREATE SEQUENCE**
Aadds a sequence to the current database. The owner of the sequence is the user who creates it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aj619zax0pwyb2go9cue.png)

**CREATE SERVER**
Defines a new foreign server.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxtcw710inak42kaxfw9.png)

**CREATE SYNONYM**
Creates a synonym object. A synonym is an alias of a database object and is used to record the mapping between database object names. You can use synonyms to access associated database objects.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksc1vcabvjitzwjrrcdm.png)

**CREATE TABLE AS**
Creates a table from the results of a query.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7zyym4yyemoun1iyd0q.png)

**CREATE TABLESPACE**
Creates a tablespace in a database.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00o6hhuvf8y0rh98l0gy.png)

**CREATE TEXT SEARCH CONFIGURATION**
Creates a text search configuration. A text search configuration specifies a text search parser that can divide a string into tokens, plus dictionaries that can be used to determine which tokens are of interest for searching.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jaem3cqbpysqx7e9xbaj.png)

**CREATE TEXT SEARCH DICTIONARY**
Deletes a full-text retrieval dictionary.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djmsba8b3tjjd9qors7y.png)

**CREATE TRIGGER**
Creates a trigger. The trigger will be associated with the specified table or view, and will execute the specified functions under certain conditions.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udepeou5hor07q1qbb5f.png)

**CREATE TYPE**
Defines a new data type for use in the current database. The user who defines a type becomes its owner. Types are designed only for row-store tables.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td9n602rv07llipqvbe8.png)

**CREATE USER**
Creates a user.

CREATE USER user_name [ [ WITH ] option [ ... ] ] [ ENCRYPTED | UNENCRYPTED ] { PASSWORD | IDENTIFIED BY } { 'password' [ EXPIRED ] | DISABLE };

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kf3usqqerh6z4s1aov2.png)

**CREATE VIEW**
Creates a view.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/320pkwe5j8ms699lrlwz.png)

**CREATE WEAK PASSWORD DICTIONARY**
Inserts one or more weak passwords into the gs_global_config table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ibvkube5glz0ow2ool8.png)

**CURSOR**
Defines a cursor to retrieve a small number of rows out of a large query.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmafgrzgyj1blzj880ct.png)

**DEALLOCATE**
Deallocates a previously prepared statement. If you do not explicitly deallocate a prepared statement, it is deallocated when the session ends.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2oxawq2z3ptpad9py6a.png)

**DECLARE**
Deallocates a previously prepared statement. If you do not explicitly deallocate a prepared statement, it is deallocated when the session ends.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n9811225pk9r0xrupoav.png)

**DELETE**
Deletes rows that satisfy the WHERE clause from the specified table. If the WHERE clause is absent, it will delete all rows in the table. The result is a valid, but an empty table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5u5mo6awunylv69zs5v.png)

**DO**
Executes an anonymous code block.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvt0n58mmkm89myx0gs8.png)

**DROP AUDIT POLICY**
Deletes an audit policy.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tay1ne4qlsq5jx6zqxn0.png)

**DROP CLIENT MASTER KEY**
Deletes a CMK.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wipomqficfl0uj880k9.png)