Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Updating Data by Using SQL UPDATE statement

Posted: Sep/24/2009   By: nikhil   Points:15   Category: MySQL  - Query    Views:178   Vote Up (0)   Vote Down (0)    
SQL UPDATE statement is used to update existing data in a data table. It can be used to change values of single row, group of rows or even all rows in a table. In MySQL, the SQL UPDATE statement form is as follows:


UPDATE [LOW_ PRIORITY] [IGNORE] table_name [, table_name...]
SET column_name1=expr1 [, column_name2=expr2 ...]
[WHERE condition]

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

Selecting Data with SQL IN

  
SQL IN allows us to select values which match any one of a list of values. The use of SQL IN is as follows:

SELECT column_list
FROM table_name
WHERE column IN ("list_item1","list_item2".)The column in WHERE clause does not need to be in column_list you select, but it has to be a column in the table table_name. If the list has more than one value, each item has to be separated by a comma.
In addition, we can use NOT operator with SQL IN to get values which does not match any value in a list of value.

Retrieving Data in a Range with SQL BETWEEN

  
SQL BETWEEN allows you to retrieve values within a specific range. The usage of SQL BETWEEN is as follows:

SELECT column_list

FROM table_name

WHERE column_1 BETWEEN lower_range AND upper_range

Inserting Data into Table

  
In this tutorial, you will learn how to insert data into database tables by using SQL INSERT statement.

INSERT Statement
INSERT statement allows you to insert one or more rows to the table. In MySQL, the INSERT statement form is listed as follows:

Deleting Data by Using SQL DELETE Statement

  
To remove a data row or all rows from a table you can use SQL DELETE statement. The syntax of SQL DELETE statement in MySQL is as follows:


DELETE [LOW_PRIORITY] [QUICK] FROM table_name
[WHERE conditions]
[ORDER BY ...]
[LIMIT rows]
 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge