Share
, ,

MySQL: Selecting Multiple Columns

  • Retrieve more than one column of a table in the same SELECT statement-
    SELECT name,zip FROM customers
  • Show all the columns of a table in the same SELECT statement-
    SELECT * FROM customers




Notice:
  1. For retrieving more than one column in a single SELECT statement then write column names between SELECT and FROM putting comma(,) among the columns name.
  2. To select all columns in the same SELECT statement then you can use astrics(*) sign instead of writing all the columns name.
  3. Here name, zip are columns and customer is table.


                                           

0 comments:

Post a Comment