Begin ...... END is used to define compound statements. ';' is the end of each statement. In your case Mysql gets two queries
Begin Declare DBName Varchar(20);
and
End;
Both are invalid queries that is the reason you are getting error. And I think you may not be able to run compound statements from MySQL command prompt without creating procedure
Main Topics
Browse All Topics





by: prshntksnghPosted on 2009-08-25 at 21:02:07ID: 25184348
These commands are used within the procedures, I think the problem is you are trying to run it from MySQL command prompt.