Results 1 to 3 of 3

Thread: SELECT - Command in SQL

  1. #1
    Join Date
    Dec 2008
    Posts
    12

    SELECT - Command in SQL

    Hi,

    I am in SQL. Currently trying to collect some information about the SQL.
    So I want some information about the SELECT - Command in SQL.

    Anybody can please help me......

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: SELECT - Command in SQL

    The SQL SELECT clause specifies the fields, constants, and expressions to display in the query results.

    syntax for the SELECT clause is as follows:

    Code:
    SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] Select_List_Item [AS Column_Name] [, ...]
    The following code examples show many ways of retrieving data with the SQL SELECT command.

    1. SELECT customer.company FROM customer

    2. SELECT UPPER(city) AS CityList FROM customer

    3. SELECT country, postalcode, company FROM customer ORDER BY country

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: SELECT - Command in SQL

    SQL is a fourth generation language designed for working with relational databases. SQL usually contains several dozen commands. The select command is the most important for most users. Its purpose is to retrieve data.

    The basic form of the SQL select command:

    Select columnlist
    from tablelist
    where conditions
    group by grouplist
    order by orderlist

    Columnlist: The list of columns to appear in the output. To retrieve more than one column, separate the column names with commas. * (the asterisk) used as a column name means retrieve all columns.

    Tablelist: The list of tables that participate in the query. Separate multiple table names with commas.

    Conditions: Expressions that serve to limit the number of rows returned from a table, or to join rows from two or more tables.

    Grouplist: If specified, SQL groups the rows in the output by columns in this list. Grouping is most often used with aggregating functions to produce summaries of data. SQL produces one row for each unique value found in the grouping column, and the function is calculated for all rows that belong to the group.

    Orderlist: If specified, SQL sorts the output rows by the columns in this list. Example: order by state, city

Similar Threads

  1. Replies: 2
    Last Post: 21-03-2012, 03:23 AM
  2. Excel - Select Switch Command keeps running
    By wuuhaahaa in forum Windows Software
    Replies: 1
    Last Post: 22-10-2009, 11:31 PM
  3. Replies: 3
    Last Post: 03-09-2009, 05:41 PM
  4. SELECT UNIQUE and SELECT DISTINCT
    By TAARIQ in forum Software Development
    Replies: 3
    Last Post: 03-06-2009, 10:00 PM
  5. Replies: 1
    Last Post: 18-05-2007, 01:24 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,387,680.36682 seconds with 16 queries