MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL From Clause

The MySQL FROM Clause is used to select some records from a table. It is very important clause in MySQL because it tell from which table you want to retrieve the records. Is is also useful when retrieving records from multiple tables using JOIN condition.

MySQL FROM CLAUSE Syntax

To retrieve records from existing table, use the following syntax:

Syntax

SELECT col1,col2,col3... FROM tablename

Parameters:

tablename: The table name from which you want to remove all records.

MySQL FROM CLAUSE example retrieve data from one table

The following MySQL statement to retrieve records from "tblCustomerLoan" table:

Example

SELECT firstName, lastName, address FROM tblCustomerLoan;

Note:

In the above example, we have fetched records from "tblCustomerLoan"

You can use MySQL Command Line Client to fetched records using FROM clause from "tblCustomerLoan" table. It will look like this:

Show FROM CLAUSE Example with retrieve data from two tables with inner join

To retrieve data from multiple tables using INNER JOIN from existing tables, use the following syntax:

Example

SELECT B.banks, A.accountName FROM tblbankdemataccountcharges A 
Inner Join tblbankheadquartersandaddress B LIMIT 5; 

You can use MySQL Command Line Client to data from multiple tables using INNER JOIN from tables. It will look like this: