Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got tab completion working for tables and columns (--auto-rehash), is there any way to also have tab completion for SQL commands eg

SE (tab) --> SELECT
SELECT * FR (tab) --> SELECT * FROM
share|improve this question
    
stackoverflow question? –  ricbax Oct 6 '10 at 2:52
    
I'm not sure what your interface is. Is this some kind of MySQL client software, or the command line perhaps? –  NReilingh Oct 6 '10 at 3:20
    
Looks like the stock mysql client program to me. –  Ignacio Vazquez-Abrams Oct 6 '10 at 4:11

1 Answer 1

up vote 1 down vote accepted

You're probably talking about mysql command-line client.

For a single session, you can enable tab completion with command line switch --auto-rehash .

To set this behavior default, check your mysql configuration file my.cnf, find [mysql] region, and replace line

no-auto-rehash

with

auto-rehash
share|improve this answer
    
ahh, SQL commands must be typed in caps for autocompletion to work –  cerberos Nov 28 '12 at 11:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.