Skip Site Navigation «

dbrowse

app«dbrowse
MySQL

Table Structure

This node is informative, descriptive and functional.
[definitions]

Query Path

Interactive Path

Synopsis

This is a structural view of the active table in the current database.

Node/View

Table laz.abbr: Structure.
mysql> describe laz.abbr;
Field Type Null Key Default Extra
4 rows in set (0.0003 seconds)
aid smallint(5) unsigned Yes NULL auto_increment
tag enum('acronym','abbr') No acronym
abbr char(8) No
phrase char(64) No

[skip to the dbrowse Navigation information]

Selected Data

To learn more about the design of this table, and see some or all of the data contained in it, visit the view. Or you may Enter the keyword “data” onto the end of the interactive path interface above.

SQL Statements

The following three MySQL statements are equivalent:

mysql> describe laz.abbr; mysql> show columns from laz.abbr; mysql> show fields from laz.abbr;

The first form is provided for Oracle compatibility. I prefer it for its brevity.

Description of Results

For detailed documentation regarding the information displayed on this page, visit the MySQL Reference Manual section on Describe Table. Brief descriptions are listed below, some of which have links to more specific sections of the manual.

MySQL Terms

Field
The name of the column in the table. Unlike naming rules for tables, since they are based on the underlying OS, these are restricted both by the MySQL RDBMS, and possibly the Storage Engine of the table itself. See Legal Names for details. If the column name is rendered in blue, then it is a foreign key and selecting it will move you to the detailed view of the index in the table that it references.
Type
There are many column types and there is simply no room here for even a brief description of all of them. I recommend you study Column Types thoroughly.
Null
Indicates whether Null (empty, void, nil...) values are allowed.
Key
Whether the field is indexed. PRI indicates the key is primary, UNI indicates the field is part if a unique index and MUL indicates the field is allowed to have multiple occurances (non-unique) within an index. Indexes are very important to faciltate fast lookups of data, but they must be designed with care and some experience. If you’re going to remember anything from this series, then you should try to remember this: index fields you search on (where clause), not ones you select (results). More details will follow in the next section on keys and indexing. Go figure!

Notes: Rows in this view that contain fields that are primary keys are offset from others by the use of a brighter background color. Fields that are keys of any sort are also links in this column to the keys query path for this table.
Default
The default value, if any, assigned to the field. An Enum (enumerated) type is an example of one that would normally have a default value.
Extra
Any additional attributes that may be associated with the field when it was created. An example of this is the auto_increment modifier.

Create Table

To create this table using your own MySQL installation, use the following syntax:

CREATE TABLE `abbr` ( `aid` smallint(5) unsigned NOT NULL auto_increment, `tag` enum('acronym','abbr') NOT NULL default 'acronym', `abbr` char(8) NOT NULL default '', `phrase` char(64) NOT NULL default '', PRIMARY KEY (`aid`), UNIQUE KEY `uk` (`aid`,`abbr`) ) TYPE=MyISAM;

To view the indexing details for this table, select any of the links in the Keys column of this view. To continue to browse the database, you can utilize the query and interactive path navigation tools provided with this application. Or simply use your Web browser’s features.

Last updated: Friday, October 31st, 2008 @ 3:15 AM EDT [2008-10-31T07:15:33Z]   home

(c) 2010-2012, Douglas W. Clifton, loadaveragezero.com, all rights reserved.