Why do in SQL*PLUS we have SET SCAN and SET DEFINE both ?
I know both are used interchangeably in SQL.
I tested and found that if i set any of them OFF, substitution variables will not work.
Is their any specific case where we need both and importance of both can be understood simultaneously?
Thanks in advance.
SET DEFINEis more flexible as it lets you change the substitution character from&to something else, whereasSET SCANcan only be turned on or off.Probably more importantly,
SET SCANis obsolete; from the documentation:So both work for now, but I wouldn’t use
SET SCANin any new code.