intellisense providing Table name in `select()` along with columns

4 Replies
NazCodeland
NazCodeland16mo ago
it should only be showing the column names right?
oof2win2
oof2win216mo ago
well those are the column names in sql, you can refer to a column by User.email and email and they are identical (assuming the table is called User) it becomes more important with left joins etc. where you can have multiple different tables and you want to keep it sane, so you would use User.email and User.yada yada etc.
Igal
Igal16mo ago
@oof2win2 is correct. When joining tables, subqueries, CTEs and a column name exists in more than 1 data source in query context, its generally a good idea to refer to it prefixed by the data source. Some engines, in some SQL clauses might even throw an error due to ambiguous references, so it becomes a must.
NazCodeland
NazCodeland16mo ago
Awsome thank you @oof2win2 and @Igal
Want results from more Discord servers?
Add your server