There are multiple ways to use SELECT statement in SQL.
SELECT statement can be used to select single column from a database.
For instance, If we only want to see the customers names from customers table.
<?php
SELECT column_name FROM table_name;
?>
SELECT statement can be used to select single column from a database.
Let’s assume we have a table named as customers and this table having multiple columns like customer_name, customer_address, customer_contact_no. We want to select all the data of customer the above select statement will be utilized.
<?php
SELECT column1, column2....columnN
FROM table_name;
?>
SELECT statement can used to select whole data from a database.
<?php
SELECT * FROM table_name;
?>