Today I learned how to decalre a variable from textbook and the code they give me is
'DECLARE test_sql INT DEFAULT 10;'
When I run this line I got an error 1064 syntax
error.
How to fix my code?
Then I run 'SET @test_sql=30;'
and it works so are there any differences between these two codes and can I declare a variable with a default value by using a SET sentence?