SQL SERVER – Four Basic SQL Statements – SQL Operations

There are four basic SQL Operations or SQL Statements. SELECT, UPDATE, INSERT and DELETE are the four basic SQL statements.

SQL SERVER - Four Basic SQL Statements - SQL Operations

SELECT – This statement selects data from database tables.

UPDATE – This statement updates existing data into database tables.

INSERT – This statement inserts new data into database tables.

DELETE – This statement deletes existing data from database tables.

If you want complete syntax for this four basic statement, please download FAQ (PDF) from SQL SERVER – Download FAQ Sheet – SQL Server in One Page

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

Database, Software Development, SQL Coding Standards
Previous Post
SQL SERVER – SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable – Part 2
Next Post
Untested Backup: The Joke That Ends With a Resignation Letter

Related Posts

9 Comments. Leave new

  • How do I write an Update Statement for the following:

    Databases are:
    I and B. —–Both on the same server.

    The tables are:
    I.tblInstitution and
    B.tblBData

    The columns are:
    B.tblBData.InstFK —-Needs update
    B.tblBData.LeID
    I.tblInstitution.InstPK
    I.tblInstitution.LeID

    B.tblBData.InstFK = I.tblInstitution.InstPK
    Where B.tblBData.LeID = I.tblInstitution.LeID

    Thank you.

    Reply
  • Imran Mohammed
    August 7, 2008 3:08 am

    @sue

    This might work,

    Use B
    update tblBData
    set tblBData.InstFK = A.InstPK from I..tblInstitution A
    Where tblBData.LeID = A.LeID

    You are using wrong four-part-name syntax.

    Four-part-name is something like this,

    servername.databasename.ownername.objectname

    but you misunderstood this concept and replaced the last objectname by column name.

    Hope this helps,
    Imran.

    Reply
  • Vijaya Kadiyala
    July 21, 2009 10:52 pm

    Hi Pinal,
    I think there should be some awards who are answering the comments/questions of your articles.
    gr8 going…..

    Reply
  • @Vijaya

    Awards? Imran, a big contributor, has his name bolded on the side bar. Pinal recognizes frequent contributors.

    Reply
  • Hi Pinal,

    i want to disable the stored procedure. Please tell me any way to disable.

    Reply
  • Hi ,

    can MS Sql data migrate to Oracle DB?
    also how to create Database backup using script ?

    Reply
  • ok thanks….

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.