Autocomplete - instructions on how to use it, please

[expired user #8680]'s profile image [expired user #8680] posted 9 years ago in General Permalink
Hello.
First of all, many thanks for such a fine software. We are all very fortunate when people openly share for free thousands of hours of very hard work to come up with something as powerful as HS.
But there's something that has always puzzled me about HS: it's autocomplete feature.
I have searched hours and hours in the forum and in the site (help) for a guide on using HS, especially it's autocomplete feature. The site (help) has some cool information but nothing regarding autocomplete.
In the forum I could find some scattered information about using the dot (.) and something about ctrl+space.
Both seem to call a child window with functions, keywords, tables, etc, but:
- both miss the columns in that window
- the dot is weird because I end up with something like .SELECT * FROM .tableACME but when I try to run the command I get a syntax error.

So, is there a manual for all HS features?
Or at least is there a manual for the autocomplete?
How can I use autocomplete for columns?
And what's with the dots?

Thanks in advance.
Cheers
ansgar's profile image ansgar posted 9 years ago Permalink
When you don't need a dot in your SQL query, you should not type the dot, but press Ctrl+Space instead.

Column names only appear if you have typed a table alias + a dot, or a table name + dot. For example:
SELECT * FROM table1 WHERE table1.|
SELECT * FROM table1 AS a WHERE a.|

The pipe is meant to show the cursor position, not a pipe as a character.

Now, in the data grid, you have a filter area. This area also has this auto complete feature. With one benefit, because the data grid knows its table name exactly: Columns are also displayed with Ctrl+Space here. That's only possible because the SELECT query is not user defined, but auto-generated by HeidiSQL, and HeidiSQL knows the table name from which to display column names.
[expired user #8680]'s profile image [expired user #8680] posted 9 years ago Permalink
Hi ansgar.
Excellent explanation! :-)
Much easier to understand things now. By the way, is there a way to change ctrl+space to the cursor down key? I'm so used to using it that way on other DB software...
Thanks in advance.
Cheers

Please login to leave a reply, or register at first.