File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ license: |
2020---
2121
2222### Description
23- ` USE ` statement is used to set a current database. After a current database is set,
24- the unqualified database artifacts such as tables, functions and views that are
23+ ` USE ` statement is used to set the current database. After the current database is set,
24+ the unqualified database artifacts such as tables, functions and views that are
2525referenced by SQLs are resolved from the current database.
2626The default database name is 'default'.
2727
@@ -35,20 +35,20 @@ USE database_name
3535<dl >
3636 <dt ><code ><em >database_name</em ></code ></dt >
3737 <dd >
38- Name of the database will be used. If the database is not exist an exception will be thrown.
38+ Name of the database will be used. If the database does not exist, an exception will be thrown.
3939 </dd >
4040</dl >
4141
4242### Example
4343{% highlight sql %}
44- -- Use the 'userdb' which is exist .
44+ -- Use the 'userdb' which exists .
4545USE userdb;
4646+---------+--+
4747| Result |
4848+---------+--+
4949+---------+--+
5050
51- -- Use the 'userdb1' which does 't exist
51+ -- Use the 'userdb1' which doesn 't exist
5252USE userdb1;
5353Error: org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 'userdb1' not found;(state=,code=0)
5454{% endhighlight %}
You can’t perform that action at this time.
0 commit comments