Following on from my previous post about tips I have been picking
up from the MySQL certification study guide I have another which
I think is worth mentioning.
Personally I had never noticed that the MySQL prompt changes in
relation to what went before it. How often have you done
something similar to the following.
mysql> select * from emps where emp_name = 'john ;
'> ;
'> ';
Empty set (0.01 sec)
You type in a select statement only to open a quote but never
close it, personally I always stick in another ; before I realise
the mistake and terminate the quote and end the statement
correctly. But what I didn't realise before reading the study
guide (and making me very unobservant) was that the mysql>
prompt changes in response to the currently open quote. In the
above example this isn't obvious because it just looks like a
continuation but in fact the prompt …