csev / wa4e

Course materials for www.wa4e.com
BSD 2-Clause "Simplified" License
209 stars 228 forks source link

Update SQL-02-MySQL-Design-Handout.txt #51

Closed srcatto closed 1 year ago

srcatto commented 1 year ago

MySQL 8.0. Some students have discovered phpMyAdmin, SQL, Format edits the code. Currently converts keywords, https://dev.mysql.com/doc/refman/8.0/en/keywords.html , to uppercase. They are "name", "Account" and the function "count". To prevent phpMyAdmin from editing these, although they are not reserved words, use backticks. Update the utf8 alias as per the message - "Warning: #3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. " Add ; to the end of multiple lines for consistency. Note - as the SQL isn't written all in lowercase, at this time decided not to enclose every table & column name in backticks. This may raise questions for lines like - "INSERT INTO Account (name, email) VALUES" where email is okay. All backticks ref https://devtut.github.io/mysql/backticks.html#backticks-usage Tested on - a) Win 11 x64Pro 22H2, MySQL 5.6.34 phpMyAdmin 4.7.0 b) Ubuntu 20.04 x64 MySQL 8.0.30 phpMyAdmin 5.2.0

csev commented 1 year ago

Thanks.