MySQL Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback
 





MySQL Select Multiple columns


Tutorials Mysql

Topic
How to select multiple or particular column from Mysql table?


Explanation

MySQL Select Particular Column:

    We can select particular column from mysql Table to display, regretting the entire rows. Suppose you want to see the name of the students alone we can use the below query.

mysql> select name from student;
+---------+
| name    |
+---------+
| steve   |
| david   |
| michael |
| jack    |
| anne    |
| steve   |
| anne    |
| mille   |
+---------+
8 rows in set (0.27 sec)

    This is an example for select particular column from mysql table.

MySQL Select Multiple Columns:

    We can also select more than one columns from MySQL Table, separated by commas as given in the below query.
mysql> select name, marks from student;
+---------+-------+
| name    | marks |
+---------+-------+
| steve   |   100 |
| david   |    98 |
| michael |    75 |
| jack    |    82 |
| anne    |   100 |
| steve   |    75 |
| anne    |    80 |
| mille   |    98 |
+---------+-------+
8 rows in set (0.03 sec)
    We have selected both name and marks from the table student Using Mysql select multiple statement.





A Note

MySQL is the most popular open source Relational database Management system (RDBMS). Being a open source anyone can use and change the software for their needs. Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this MySQL tutorial. This is a copyright content.


Other Links

web hosting