When running queries in SQL Developer and using the character &
in my literals, a popup appears asking me to provide a variable. I then execute SET DEFINE OFF
; and I can run my query for the rest of the session.
Is there any way to configure Oracle so it can never ask for manual variables when containing the &
character?
Create a text file on your PC which contains set define off
and any other set-up instructions you might want.
Then in SQL developer, go to the Tools menu and pick the Preferences... option. In the panel on the left click on Database.
Then either type the path to the file you created, or click Browse and navigate to the file in the 'Select connection startup script' dialog that appears.
That script will then be run every time you connect to any database.