The ‘MySQL’ Archives
Posted March 18, 2004 by

Delete a column from an existing MySQL table

The SQL command in this recipe removes a column and the column’s data from an existing MySQL table.

Category MySQL

Posted February 8, 2004 by

Modify an existing MySQL column

The best laid plans of mice and DBAs oft go awry, so it is sometimes necessary to change the characteristics of a column after it exists and contains data. Beware whenever you make changes to your database — always make a backup first.

Category MySQL

Posted February 8, 2004 by

Add a column to an existing MySQL table

MySQL tables are easy to extend with additional columns.

Category MySQL

Posted February 8, 2004 by

Create a MySQL table with a primary key

A primary key uniquely identify a row in a table. One or more columns may be identified as the primary key. The values in a single column used as the primary key must be unique (like a person’s social security number). When more than one column is used, the combination of column values must be […]

Category MySQL

Posted December 14, 2003 by

Drop or delete a table in MySQL

To remove a table from a MySQL database, and remove all of its data, use the following SQL command.

Category MySQL

Posted December 14, 2003 by

Describe the column structure of a MySQL table

The SQL command ‘describe’ allows you to view the column structure of a MySQL table. It provides a listing of the columns of a table, the type of each column, and additional information on each column.

Category MySQL

Posted December 14, 2003 by

Select a MySQL database to use

A single instance of MySQL can hold many separate databases. It is important to specify the database to which subsequent commands will be issued.

Category MySQL

Posted December 14, 2003 by

Display a list of databases on a MySQL server

Use the ‘show databases’ command to display the list of dbs on the server.

Category MySQL

Posted December 14, 2003 by

Create a MySQL database

SQL command used to create to create a db.

Category MySQL

Posted December 14, 2003 by

Determine the version of MySQL server

How do I tell what version of MySQL server that I am running?

Category MySQL

Posted December 14, 2003 by

Connect to a MySQL server using the mysql command

The mysql command provides a text-based interface into the MySQL database server. Once connected, SQL commands can be issued to the server to make queries, create or alter databases or tables, or many other operations.

Category MySQL

Posted October 12, 2003 by

Change a MySQL user password

How do I update a user’s password in my MySQL server?

Category MySQL