SQL Server Information and Resources Bookmark this page

SQLINFO.net is a Community Service from DataExpressions makers of dbOrchestra©

Google
 

 

 

 


MySQL Code Examples

SQL DML

String Functions

Stored Procedures

SQL Views

SQL Table Basics


Misc MySQL UPDATE Examples

UPDATE - Single row

Update a single row of data.

START TRANSACTION
GO

UPDATE students
SET    
       customer_id_fk                = '23099-56'  ,
       marital_status_code           = 'M'  ,
       fin_alert_code                = '3'  
WHERE  student_id = 11  
GO

COMMIT 
GO

UPDATE - Update multiple rows

Update multiple rows of data..

START TRANSACTION
GO

UPDATE employeesaffiliates
SET    relationship_type_code        = '1'  ,
       employee_inactivating         = 0 
WHERE  person_id is not null 
GO

COMMIT 
GO  

 

 



Copyright 2006-2007 by DataExpressions --- All Rights Reserved            dbOrchestra - MySQL home page