-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Keyword DATABASE
synonym SCHEMA
#4855
Support Keyword DATABASE
synonym SCHEMA
#4855
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/databend/databend/44Zg6EHT7MGtS3cyMqfGcxUBRDwQ |
Thanks for the contribution! Please review the labels and make any necessary changes. |
@@ -7,9 +7,11 @@ Drop a database. | |||
## Syntax | |||
|
|||
```sql | |||
DROP DATABASE [IF EXISTS] <database_name> | |||
DROP { DATABASE | SCHEMA } [IF EXISTS] <database_name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we no need to add CREATE SCHEMA
syntax, for some databases, schema is not same as database:
https://docs.snowflake.com/en/sql-reference/sql/create-schema.html
SCHEMA
keyword is only a compatibility, not a feature, let's keep it clear for the user.
## Syntax | ||
|
||
``` | ||
SHOW CREATE { DATABASE | SCHEMA } database_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -13,3 +13,19 @@ CREATE DATABASE system; -- {ErrorCode 2301} | |||
DROP DATABASE system; -- {ErrorCode 1002} | |||
|
|||
CREATE DATABASE db.t; -- {ErrorCode 1005} | |||
|
|||
DROP SCHEMA IF EXISTS db; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test about SCHEMA
is ok here :D
e3fef6d
to
6d96912
Compare
6d96912
to
ee91d2c
Compare
Link to ISSUE databendlabs#4854
ee91d2c
to
1e1378e
Compare
Link to ISSUE #4854
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Support Keyword
DATABASE
synonymSCHEMA
Changelog
Related Issues
Fixes #4854