MySQL:Using Help

From virtualMV2015wiki
Jump to: navigation, search
 Home  MySQL, Answers <

Introduction

Overview

The objective of this exercise is to make you familiar with how to executing some SQL commands and to use the online Help. The following exercises assume you are in the SQL environment.


Icon Objectives.png

Objectives

By the end of this page you will be able to:

  • use MySQL's online help

MySQL Help

MySQL comes with a good range of documentation, which you can refer to in times of need. Documentation is available online. For MySQL 5.1 http://dev.mysql.com/doc/refman/5.1/en/

Documentation is also included with mysql. When you type in help the following is displayed.

mysql> help
help    (\h)    Display this text
?       (\h)    Synonym for `help'
clear   (\c)    Clear command
connect (\r)    Reconnect to the server. Optional arguments are db and host
edit    (\e)    Edit command with $EDITOR
exit    (\)     Exit mysql. Same as quit
go      (\g)    Send command to mysql server
print   (\p)    print current command
quit    (\q)    Quit mysql
rehash  (\#)    Rebuild completion hash
status  (\s)    Get status information from the server
use     (\u)    Use another database. Takes database name as argument
Connection id: 49  (Can be used with mysqladmin kill)
mysql>

From the information on the help screen and experimentation, answer the following:

Exercise 1:

List 4 ways to exit mysql.

Refining Help

You can view server documentation by typing help contents.

mysql> help contents
You asked for help about help category: "Contents"
For more information, type 'help <item>', where <item> is one of the
following categories:
   Account Management
   Administration
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Language Structure
   Storage Engines
   Stored Routines
   Table Maintenance
   Transactions
   Triggers

You can then get more detailed help by typing help with a category.

Exercise 2

Try typing help data types and then using the more detailed help describe each of the following data types (write a short note about each):

  1. DECIMAL
  2. CHAR
  3. BLOB
  4. DATE
  5. BOOLEAN

Exercise 3

Using the help data manipulation command find out about the following commands (write a short note about each):

  1. SELECT
  2. INSERT
  3. DELETE
  4. UPDATE
  5. SHOW
  6. CREATE DATABASE
  7. CREATE TABLE


Icon References.png References


MySQL:Using Help. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 12, 2017, from http://www.virtualmv.com/wiki/index.php?title=MySQL%3AUsing_Help    (zotero)