Chapter 8 Answers
The semicolon is used by MySQL to separate or end commands. If you forget to enter it, MySQL will issue a prompt and wait for you to enter it.
To see the available databases, type
SHOW databases;. To see tables within a database that you are using, typeSHOW tables;. (These commands are case-insensitive.)To create this new user, use the
GRANTcommand like this:GRANT ALL ON newdatabase.* TO 'newuser' IDENTIFIED BY 'newpassword';
To view the structure of a table, type
DESCRIBEtablename;.The purpose of a MySQL index is to substantially decrease database access times by maintaining indexes of one or more key columns, which can then be quickly searched to locate rows within a table.
A
FULLTEXTindex enables natural-language queries to find keywords, wherever they are in theFULLTEXTcolumn(s), in much the same way as using a search engine.A stopword is a word that is so common that it is considered not worth including in a
FULLTEXTindex or using in searches. However, it does participate in a search when it is part of a larger string bounded by double quotes.SELECT DISTINCTessentially affects only the display, choosing a single row and eliminating all the duplicates.GROUP BYdoes not eliminate rows, but combines all the rows that have the same value in the column. Therefore,GROUP BYis useful for performing operations such asCOUNTon groups of rows.SELECT DISTINCTis not useful for that purpose.To return only those rows containing the word Langhorne somewhere in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access