Search code examples
sqloracleoracle-sqldeveloper

What is the Oracle SQL Developer shortcut key for inserting duplicate strings into multiple columns?


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:

enter image description here

  1. In step 0, I would just copy the column list from a table
  2. In 2nd step, I would press 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.
  3. In 3rd step, I would do the same thing, and this time writing ) 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.


Solution

  • A mouse-aided solution, block selection.

    enter image description here

    If you're in a Code Editor (pl/sql), you can use Ctrl+Shift+PgUp/Down to add cursors.

    enter image description here