Is there a keyboard shortcut for writing "SELECT * FROM" template?

user2850769 picture user2850769 · Jan 16, 2014 · Viewed 54.8k times · Source

Is there a way to generate a SELECT * FROM template in SQL editor by a certain keyboard shortcut in PL/SQL Developer or another similar tool ?

It would be great to save the time needed to write this repetitive statement with such keyboard shortcut.

Answer

Praveen Raj Kumar.Y x picture Praveen Raj Kumar.Y x · Aug 25, 2014

We can set up some shortcuts for there regularly used words. For example, we can type s, and pressing the space bar, the letter s will be replaced with SELECT and another example, type sf and hit space bar, it will be replaced with select * from. This really saves a lot of time instead of writing these statements again and again.

To do this: Go to Tools -> Preferences -> Editor -> autoreplace -> Click Edit

In the pop up box, type the following definitions:

s = SELECT
f = FROM
w = WHERE
o = ORDER BY
d = DELETE
sf = SELECT * FROM
df = DELETE FROM
SC = SELECT COUNT (*) FROM

and save the AutoReplace.txt file, wherever you want. Click Apply and go ahead trying to use them.

If you want to edit/add/delete some of the above defined shortcuts, perform the same procedure from the Tools menu until clicking the Apply button.

Hope this helps you, as it did to me.