91-9990449935 0120-4256464 |
MySQL SELECT StatementThe MySQL SELECT statement is used to fetch data from the one or more tables in MySQL. We can retrieve records of all fields or specified fields. Syntax for specified fields: Syntax for all fields: MySQL SELECT Example 1: for specified fieldsIn such case, it is mandatory to specify field names. Example: MySQL SELECT Example 2: for all fieldsIn such case, we can specify either all fields or * (asterisk) symbol. MySQL SELECT Example 3: from multiple tablesMySQL SELECT statement can also be used to retrieve records from multiple tables by using JOIN statement. Let's take two tables "students" and "officers", having the following data. Execute the following query: Output:
Next TopicMySQL WHERE clause
|