MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL Select Statement

The SELECT statement is used to select or fetch the data from one or more database tables. The result of the SELECT statement is called a result set that is a list of rows, each consisting of the same number of columns.

MySQL SELECT TABLE Syntax

To select the existing table, use the following syntax:

Syntax

SELECT Col1, Col2, Col3... FROM tablename [WHERE conditions];

OR

SELECT * FROM tablename [WHERE conditions];

Parameters:

tablename: The table name from which you want to fetch data.

conditions: The conditions optional parameter.

MySQL SELECT TABLE examples for specified fields

The following MySQL statement to select or fetch data from existing table:

Example

SELECT firstName, lastName, address FROM tblCustomerLoan;

Note:

In the above example, we are fetching data for selected fields.

You can use MySQL Command Line Client to fetching data from existing table. It will look like this:

MySQL SELECT TABLE examples for all fields

The following MySQL statement to select or fetch data for all fields from existing table:

Example

SELECT * FROM tblCustomerLoan;

Note:

In the above example, we are fetching data for all fields.

You can use MySQL Command Line Client to fetching data from existing table for all fields. It will look like this: