pf » MySQL Command Line Help
MySQL Command Line Help
I tend to use MySQL from the interactive command line shell quite a bit (SSH to your db server and type the command mysql to start). I noticed today that there is a pretty extensive built in help system in this command.
You can access it by typing help COMMAND, so for instance if you type help ALTER TABLE you get a quick reference for constructing an ALTER TABLE statement.
If you can't remember what command you want to use, then typing help contents is your friend. It will output:
For more information, type 'help item', where item is one of the following categories: Administration Column Types Data Definition Data Manipulation Functions Geographic features Transactions
So if your looking for that command that outputs all the columns in a table, but don't know what it's called, you might now try help administration and it will tell you:
For more information, type 'help item', where item is one of the following categories: ANALYZE BACKUP TABLE CHECK CHECKSUM CONSTRAINT CREATE USER DESCRIBE FLUSH QUERY CACHE GRANT TYPES MERGE RENAME USER REPAIR RESET SLAVE RESTORE SET GLOBAL SQL_SLAVE_SKIP_COUNTER SET PASSWORD SHOW SLAVE STATUS START SLAVE STOP SLAVE
Yes ofcourse the command to show the columns in a table is called DESCRIBE, and you can get the help for it by typing help DESCRIBE (you pretty much just run DESCRIBE tableName)
My only wish for this handy feature is that some of the help pages listed simple examples, and not just syntax.
add to del.icio.us
| Tags: mysql, documentation, help, command, describe, alter table
Help me cause I'm need to both mysql and php.
Thanks, Ishraga, Sudan.
- CFSCRIPT Cheatsheet
- 3 New Image Effects for ColdFusion 8
- Googlebot to Submit Web Forms
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks
- 10 Most Useful Image Functions in ColdFusion 8
- Speaking at NYC CFUG This Week
- Adobe AIR Tutorial for HTML / JavaScript Developers
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL
RSS
Pete Freitag is a software engineer, and web developer located in










