In MySQL using a simple command is possible to have important information from a table, the DESCRIBE command is used to return data as columns and type of data they store.

To use the DESCRIBE command just use the following syntax:

DESCRIBE [Table Name]

Let’s use a practical example using a table called tbl_product to exemplify the use of the command.

DESCRIBE tbl_product

At the time this command is executed will be made available the following information:

  • All columns of the table;
  • The data type of each table indicated by the column “Type”;
  • The NULL indicator showing whether or not this field accepts this type of information;
  • If the column is a primary key or not, this information will be shown in the column “PRI”;

In addition to the standard columns with information other columns are displayed as “UNI”, “MUL”, and “DEFAULT”, for example.

Although simple DESCRIBE command is one of the most important features that MySQL offers and so know it is pretty important.

mysql

MySQL has gained much market share as well as web development language PHP, learn about MySQL PHP combined with our official site.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.