H I O X INDIA
MySQL Tutorial
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch
 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
More about Mysql
Feedback




Mysql Database: SELECT Query


Topic

How to retrieve data from the database table?
How to select a column from the database table?


Explanation

    After inserting datas into the table, we probably want to check the datas are stored correctly. To do so, we use the SELECT query.

The Select syntax is

SELECT what_to_select from tbl_name;

    To view all the data from the table, we use the below query.

mysql> select * from student;
+--------+---------+-------+------------------+---------+
| studid | name    | marks | address          | phone   |
+--------+---------+-------+------------------+---------+
|      1 | steve   |   100 | 5th cross street | 2456987 |
|      2 | david   |    98 | welling street   |  547896 |
|      3 | michael |    75 | edinburgh        | 2598234 |
|      4 | jack    |    82 | victoria street  | 2436821 |
|      5 | anne    |   100 | downing street   | 2634821 |
|      6 | steve   |    75 | downing street   | 2874698 |
|      7 | anne    |    80 | edinburgh        | 2569843 |
|      8 | mille   |    98 | victoria street  | 1236547 |
+--------+---------+-------+------------------+---------+
8 rows in set (0.00 sec)
    The above example query will list the complete details of the student table. Here * will select all the columns from the table.






        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.


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

Other Links