Boost your productivity with MySQL’s auto completion feature

MySQL sports a feature called “auto rehashing” using which database, table and column names can be auto completed by keyboarding TAB. To enable it enter rehash or \# in the mysql shell.


Completion doesn’t happen if there’s no default database. Hence access a database first.

| Database           |
| information_schema |
| events             |
| mysql              |
| performance_schema |
4 rows in set (0.00 sec)
mysql> USE events;
Database changed

That’s it. Now you can type first few characters followed by TAB to complete the name/command if it’s unambiguous. Else Double TAB show all the possibilities.

Source: MySQL doc

About Deepak Devanand

Seeker of knowledge
This entry was posted in MySQL and tagged , . Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s