H I O X INDIA
MySQL Tutorial
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback





Selecting/Select columns


Topic

How to select a particular column?
How to select multiple columns?



Explanation

    We can select a particular column 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)
    We can also select multiple columns, 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)
    In the above query, we have selected both name and marks from the table student.




others


        MySQL is the most popular open source database Management system. 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.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links