I have a background in Teradata SQL programming and recently started working on Oracle SQL Developer. In Teradata, whenever I needed to write same code of lines, different only in few areas, I used to do shift + alt + up
, write the code and it would insert it onto multiple lines which I have selected. Something like below:
shift + alt + up
and then press up
enough number of times selecting the lines where I want to insert the code, and then start typing SELECT COUNT(DISTINCT
in front of let's COLUMN_P
, but it would parallelly copy same code in front of selected lines.) FROM TABLE_XYZ;
I tried looking into the documentation but could not find any. Does there exist a short-cut to perform this action?
Thanks in advance.
A mouse-aided solution, block selection.
If you're in a Code Editor (pl/sql), you can use Ctrl+Shift+PgUp/Down to add cursors.