Q&A

Q1:I keep getting a SQL error whenever I try to use a function, such as
mysql> SELECT CURTIME ();
ERROR 1064: You have an error in your SQL syntax near '()' at line 1
A1: Functions should never have a space between the name of the function and the opening parenthesis.
Q2:Regular expressions seem complicated, but powerful. Do I really need to learn about them?
A2: Agreed, regular expressions may not appear to be the most friendly things. For simple string comparisons, you may find the LIKE operator does what you want, or perhaps MySQL's string functions such as LENGTH(). However, remember regular expressions are powerful and can detect patterns that other functions cannot.
Q3:How can I display dates and times in a user-friendly format?
A3: ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.