What is the difference in between
set test_var = 20;
and
set test_var:=20;
as they both seem to ass
You can only use := for assignment - never for comparison. It's just a bit of syntactic sugar, it doesn't really change the functionality at all. You'll see it a lot in generated SQL from code.