ACCUWEBHOSTING.COM
Live Chat
Sales / Billing / Support
Support
FAQ, Help Desk
Affiliate
Earn $20.00 / Sale
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    John_Accuwebhosting is offline Senior Member John_Accuwebhosting is on a distinguished road
    Join Date
    Jun 2006
    Posts
    124
    Blog Entries
    16
    Rep Power
    0

    Default Some useful SQL commands



    Selecting values from the database table


    Select query is used to select data from database table. The syntax is below:
    Syntax:- Select column_name from table_name.
    Use “distinct” keyword if you want to return only distinct (not common) values.
    Syntax:- select distinct column_name from table_name
    Sorting Rows:


    Order by clause is used to return result in sorted way. For example:


    Select column_name from table_name order by column_name


    Joins:
    Inner Join, Left Join, Right Join, Union Join


    Inner Join:
    Return all the rows matching in both the tables.


    Left Join:
    Return all the rows of first table even if they are not matching with second table.


    Right Join:
    Return all the rows of second table even if they are not matching with first table.


    Union:
    To display information from two tables with same data type. Union ALL will display duplicate rows of two tables.


    Difference between truncate and delete:


    Truncate will remove all the data from a table but it will not delete the table it self.


    ALTER TABLE:
    This statement is used to add or drop columns in an existing table.

  2. #2
    kilter is offline Senior Member kilter is on a distinguished road
    Join Date
    Oct 2009
    Posts
    98
    Rep Power
    11

    Default Re: Some useful SQL commands



    A SQL clause is the word or phrase that begins each SQL command statement and the single most important component to any SQL command. Looking at the clause of any given SQL command usually tells the SQL programmer what that particular command intends to do to the database. For instance, a SELECT command begins with the SELECT clause and any level of SQL programmer will recognize the SELECT query as a command selecting data from the database.

    Other SQL clauses include:

    * Add
    * Drop
    * Create
    * Insert
    * Select
    * Update
    * Replace
    * Delete
    We go beyond the usual all american packaging to offer you an HUB certified packaging supplier | packing supplies.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
© Copyright 2010 - 2020 AccuWebHosting.Com. All rights reserved. AccuWebHosting.com,
48 Bi-State Plaza #185 Old Tappan, NJ 07675, United States of America

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45