3 ms·
> This already allows autocomplete for the attributes to work. So does the other way around in several SQL engines. If you write something a long the lines of
by kodemager 5y ago
> This already allows autocomplete for the attributes to work.
So does the other way around in several SQL engines.
If you write something a long the lines of select x.ID, y.NAME from bla.bla as x join hum.hum as y on x.ID = y.FK in msSQL you’ll get autocomplete on x. and y..
You’re right that it’s more intuitive to write the from first of course.
- irishsultan 5y agoYou can't possibly get autocompletion on x. and y. for that first select if you didn't write that from clause yet (or at least the autocompletion you'd get would not be tailored to those tables).
- faho 5y agoIf you add the table name you could, and that's what "x." here is. So yes, you can autocomplete SELECT employee.Na<TAB> to "employee.Name", but it requires you to type the table name "employee." first. But with the from-first style you can autocomplete even bare column names - you know you have "name" (possibly even "employee.name" and "supervisor.name") and "employeeID".
- irishsultan 5y agoExcept that the table name isn't necessarily going to be that x. If you are matching employees with their managers then you have two employees tables in that expression so you have to work with aliases. At which point autocompletion breaks down.