MySQL statements without delimiter

There are two statements in MySQL that do not require the end delimiter (which is ‘;’ by default). These statements are as given below:

USE

The USE statement is used to select the database in MySQL as your current database. The database selected by USE statement remains default until you change it with another USE statement or the command line session expires. Also it does not harm if you write ‘;’ or the delimiter used by you to end the USE statement. The syntax for use statement is as below:

USE db1; or USE db1 both will work

where db1 is the name of the database.

EXIT or QUIT

The above statement is used to quit your current MySQL client session. This command does not affect any nodes connected to the cluster.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s