Skip to Main Content

Copy and Paste Predicates in SQL Developer

nemecjApr 16 2020 — edited Apr 21 2020

Very practical feature in SQL Developer is the possibility to copy the column name of a table

imgA.jpg

But often you want to have not only the column name, but a whole predicate such as:

column_name = column_value

It would be very practical to simple highlight a value of some column in the query result

imgb.jpg

and to get a possibility in the right mouse button menu to copy the whole predicate

column_name = column_value

img1.jpg

For varchar2 column the value would be enclosed in apostrophes

     Copy col1 = 'B'

In case of DATE column few options could be suggested such as

    Copy Col2 = DATE’2020-04-15’

    Copy col2 = to_date(’15.04.2020’,’dd.mm.yyyy’)

The latter option would be driven be the NLS settings.

If values of more columns would be selected, the resulted predicates would be connected with AND.

All of this can be done in SQL Developer already now, but in several steps with additional edit - this feature I'd love to have several times each day in my work. Special features, like greater then, parentheses etc. will be edited manually as usual.

Comments
Post Details
Added on Apr 16 2020
3 comments
40 views