Monday 21, May 2012
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

SQL Update

The Update command is used to make changes to records in tables. The general syntax is as under.

Syntax:
UPDATE table_name
SET Column1 = Value1, Column2 = Value2,…
WHERE Some_Column = Some_Value

Example:

Table(
empinfo)

FirstName

LastName

Email

DOB

Phone

Ajay

Rathor

ajayrathor@studiesinn.com

08-24-1986

349 773-4115

David

Fernandas

davidfernandas@studiesinn.com

04-16-1977

713 155-4320

Steve

Martin

smart.steve@studiesinn.com

08-04-1988

362 497-9345

UPDATE empinfo
SET Phone = '421 873-1432'
WHERE FirstName = 'Steve'

If we don’t specify a WHERE clause in the SQL expression above, all employee’s Phone will be updated to '421 873-1432', so be careful with the SQL UPDATE command usage.

 
     
   
SQL Tutorial
 
  SQL Introduction
SQL Introduction
  SQL Select
SQL Select
  SQL Where Clause
SQL Where Clause
  SQL Distinct
SQL Distinct
  SQL AND Operator
SQL AND Operator
  SQL OR Operator
SQL OR Operator
  SQL Order By
SQL Order By
  SQL Insert
SQL Insert
  SQL Update
SQL Update
  SQL Delete
SQL Delete
  SQL Join
SQL Join
  SQL Inner Join
SQL Inner Join
  SQL Left Join
SQL Left Join
  SQL Right Join
SQL Right Join
  SQL Full Join
SQL Full Join
  SQL Create Database
SQL Create Database
  SQL Create Table
SQL Create Table
  SQL Constraints
SQL Constraints
  SQL Alter Table
SQL Alter Table
  SQL Truncate Table
SQL Truncate Table
  SQL Drop
SQL Drop
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download Domain Names Guide Ebook Domain Names Guide
   
Download Starting Your Online Retail Niche With Drop Shipping  Ebook Starting Your Online Retail Niche With Drop Shipping
   
Download The 7 Great Lies of Network Marketing  Ebook The 7 Great Lies of Network Marketing
   
Download Communication Network Analysis  Ebook Communication Network Analysis
   
Download Niche Marketing Research In Plain English Ebook Niche Marketing Research In Plain English
   
 
Studiesinn.com © 2012 All Rights Reserved.
Website Designed & Developed by TechXprtz