iTech College - Internet Technology, Online Education, E-Learning, Technician Training, Tech Tutorials, Distance Education, Virtual Learning SQL Course: Insert, Update and Delete Data - www.itechcollege.com SQL Course: Insert, Update and Delete Data - www.itechcollege.com
Online Degrees Scholarships & Fellowships Internships Student Financial Aid Study Abroad Itech Bookstore
Free Courses
HTML
JavaScript
CSS
ASP
PHP
JSP
ASP.NET
SQL
AJAX
FTP
XML
Career Center
Job List
Web Jobs
Student Jobs
Computer Jobs
Engineer Jobs
Developer Jobs
Job Search
Resume Writing
Job Interview
Salary Info


itech > courses > SQL > Insert, Update and Delete Data

Insert Data

insert statement is used to insert data into the table.

  insert into members (user, pass, page)
    values ('Wang', 'Wang123', 'wang.asp');

insert into are key words which followed by the table name. Then followed by a list of column names separated by commas and enclosed in parenthesis. Then followed by the keyword values, followed by the list of values enclosed in parenthesis.

In the example above, the column name user will match up with the value 'Wang', and the column name pass will match up with the value 'Wang123'.


Update Data

update statement is used to change data in your database. The syntax is:

  Update tablename set columnname = value
    where columnname = value;

For example:

  update members Set pass = 'John333'
    where user = 'John';

When you update the data -- you should perform it very cautiously. If you do not use key word where and specify a row, then all rows will be updated.


Delete Data

delete statement is used to delete rows of data. The syntax is:
  Delete from tablename 
    where columnname = value

For example:

  delete from members
    where user = 'John';

Be careful! If you do not include a where clause, all of the rows in the table will be deleted!

  Back to Index Page
Next Page >>   Introduction
Select Data
Insert Update and Delete Data
Create Alter and Drop Table
 

SQL Books
SQL Jobs



Bookmark:  del.icio.us digg facebook Reddit Mixx BlinkList Fark Furl NewsVine Simpy Spurl Segnalo Technorati blogmarks Google YahooMyWeb Windows Live



SQL Course: Insert, Update and Delete Data - www.itechcollege.com
Copyright ©2008, itechcollege.com. All rights reserved
iTechCollege | About iTech | Contact iTech