SELECT [DISTINCT] col1 AS colhead1, col2 AS colhead2 - PowerPoint PPT Presentation

1 / 1
About This Presentation
Title:

SELECT [DISTINCT] col1 AS colhead1, col2 AS colhead2

Description:

SELECT [DISTINCT] col1 AS colhead1, col2 AS colhead2 FROM table1 ORDER BY ordercol1 [ASC] SELECT DISTINCT Remove duplicates from the result table – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 2
Provided by: Staf1397
Category:

less

Transcript and Presenter's Notes

Title: SELECT [DISTINCT] col1 AS colhead1, col2 AS colhead2


1
  • SELECT DISTINCT col1 AS colhead1, col2 AS
    colhead2
  • FROM table1
  • ORDER BY ordercol1 ASC
  • SELECT
  • DISTINCT Remove duplicates from the result table
  • col1, col2 Column names in table1 (separated
    with commas)
  • If there are all columns from the table, may
    be used instead of column names
  • Column may also be a calculation, for example
    col2 col3 (arithmetic operators -
    / )
  • AS Column names from the table are suppositions
    to column headings at the result table.
  • You may give column headings of your own to
    the result table with AS
  • colhead1, colhead2
  • Column heading must be surrounded by single
    quotation marks ( xxx xxxx), if it consists
    of several words
  • FROM from which tables
  • table1 Table name in the database. If several
    tables, separated with commas
  • ORDER BY To order the result table
  • ordercol1 Ordering columns (separated with
    commas)
  • ascending order ASC (default)
  • descending order DESC
Write a Comment
User Comments (0)
About PowerShow.com