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
Free Courses
HTML
JavaScript
CSS
ASP
PHP
JSP
C++
ASP.NET
SQL
AJAX
FTP
XML

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


Online Education, Online Training for Your Job, Distance Education, E-learning Programs for Your Career!Online Colleges, Online Universities, E-learning & Distance Education for Your Career! Easy Job Training & Online Courses.


   Email A Friend  
 
Earn Online Degree
for Your Job
I found a job after I earned an online degree!
Online classes for finding a Job. Online College, Online University, Degrees, E-learning school, online certificate Earn your
online degree now!
Online Training
for Good Job
Why I work so hard but earn so little? Why I cannot find a high paying job?
Online training for a Good Jobs. Online Degree, E-learning school, online certificate Go to
online school now!

Copyright ©2024, itechcollege.com. All rights reserved
iTechCollege | About iTech | Contact iTech