Retrieving All the Columns

You don't need to know the column names to select data from a table. By placing an asterisk (*) in the SELECT clause, all columns of the table identified in the FROM clause will be displayed. This is an alternative to listing all the column names in the SELECT clause.

Example: Let's look at all the data stored in the REPORT table.

If you enter the statement

SELECT  *
     FROM    REPORT ;
the result displayed on the screen will be

TITLE                        AUTHOR           DEPT FILENAME
  ... Disappearing Ink         Jackson, Herbert RND  /docs/rnd/ink.txt
  ... Ink Promotional Campaign Sanchez, Carla   MKT  /docs/mkt/promo.rpt
  ... Budget for 4Q 92         Price, Stella    FIN  /docs/ad/4q.rpt
  ... Round Widgets            Smith, Roberta   RND  /docs/rnd/widg.txt
  ... Paperclips               Aster, John A.   MKT  /docs/mkt/clip.rpt
  ... Color Panorama           Jackson, Herbert RND  /docs/rnd/color.txt
  ... Meeting Schedule         Barrington, Kyle MGT  /docs/mgt/when.rpt

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.