> Quick Summary:
• &variable = placeholder that asks user for value at runtime
• & asks for value every single time it appears - even same variable name
• Text/Date values need quotes around & - numbers don't
• & works in SELECT, FROM, WHERE, ORDER BY - anywhere in the query
• &&variable = asks only ONCE and remembers for the whole session
• && persists automatically - second occurrence doesn't prompt again
• DEFINE variable = value = pre-sets the value - Oracle never asks
• DEFINE alone = shows value of one variable
• DEFINE with no args = shows ALL defined variables
• UNDEFINE variable = clears it from memory - Oracle asks again next time
• Professional scripts use DEFINE at top - change once, updates everywhere
#OracleSQL #SubstitutionVariables #DEFINE #UNDEFINE #SQLScripting #LearnSQL #SQLBeginners #Day18 #100DaysOfCode #TechTwitter