SQL Developer code tips
September 28, 2009
Few code tips for SQL Developer 2.1 (EA is available on OTN).
Create query with few keystrokes
s then pause, or hit ctrl-space
in dropdown choose
select * from
select * from then space
in dropdown choose multiple table names while holding the ctrl key. Suppose you have chosen
emp. The table/view names are auto aliased by default.
select * from dept d, emp e where then space
in dropdown choose the join condition
Multiple equality join conditions could be selected while holding ctrl key.
4. Return to the select clause, delete wildcard, and fire code insight. The column list allows multiple selections as well.
Automatic Group By
When assembling aggregation with group by query, don’t rush writing group by clause — it would be appended automatically. For example in the query
select deptno, count(1) from dept
as soon as you finished the aggregate function the group by clause would appear. If you edit the column list, then the
group by list is adjusted automatically. (However, if you edit
group by clause, then the column list is left unchanged).