Select Data From Database Table Query

  • 04-06-2022
  • 557
  • Haresh Chauhan

To fetch data from the database we must need a select query. This is a simple SQL communication why. Using select query we can select data from the database from specific table.

Below select syntax query syntax and example given it will help you to get data from the database.


Basic syntax for select query.

SELECT (column-names) FROM (table-name)

Include all columns.

SELECT * FROM (table-name)

Note: *is wildcards, Which means it will return all columns from table.

Users Table

USERS data-table Exmaple.

id firstname lastname city country phone
1 jon mick mesur uk +1983565965
1 regu mawd landon us +15216545464
3 ponty rick mumbai in +918356596525
4 butt jose sydny aus +35785287584

Examples 1: Select Table

Select all record from table.


Example 2: Specific Column

By giving name specific column query will return from the user's table.

SELECT id, name, phone FROM users

We always thanks to you for reading our blogs.


Dharmesh Chauhan

(Swapinfoway Founder)

Hello Sir, We are brothers origin from Gujarat India, Fullstack developers working together since 2016. We have lots of skills in web development in different technologies here I mention PHP, Laravel, Javascript, Vuejs, Ajax, API, Payment Gateway Integration, Database, HTML5, CSS3, and Server Administration. So you need our service Please Contact Us


Haresh Chauhan


We Are Also Recommending You :