DCL
Description |
Syntax |
Difference |
---|---|---|
Set names with COLLATE specified. |
SET [ SESSION | LOCAL ] NAMES {'charset_name' [COLLATE 'collation_name'] | DEFAULT}; |
GaussDB does not allow charset_name to be different from the database character set. For details, see "SQL Reference > SQL Syntax > SQL Statements > S > SET" in M Compatibility Developer Guide. |
Switch the current mode with USE. |
USE schema_name |
If the USE statement is used to specify a schema and the user does not have USAGE permissions on the schema, MySQL reports an error while GaussDB specifies the current schema as null.
-- MySQL mysql> USE test; ERROR 1044 (42000): Access denied for user 'u1'@'%' to database 'test' -- GaussDB m_db=> USE test; SET m_db=> SELECT database(); ERROR: function returned NULL CONTEXT: referenced column: database |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot