SQL SERVER – Four Basic SQL Statements – SQL Operations

There are four basic SQL Operations or SQL Statements.

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

Reference : Pinal Dave (http://blog.SQLAuthority.com)

9 thoughts on “SQL SERVER – Four Basic SQL Statements – SQL Operations

  1. 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

    The columns are:
    B.tblBData.InstFK —-Needs update

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

    Thank you.


  2. @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,


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

    Hope this helps,


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s