Home | Site map   
Home Products Downloads Support Contacts
   
  Interactive SQL Tutorial
 

10. Adding, deleting, updating data.

Adding Data.
To insert rows into a table, do the following:

INSERT INTO ANTIQUES VALUES (21, 01, 'Ottoman', 200.00)

This inserts the data into the table, as a new row, column-by-column, in the pre-defined order. Instead, let's change the order and leave Price blank:

INSERT INTO ANTIQUES (BUYERID, SELLERID, ITEM)
VALUES (01, 21, 'Ottoman')

 

Deleting Data.
Let's delete this new row back out of the database:

DELETE FROM ANTIQUES
WHERE ITEM = 'Ottoman'

But if there is another row that contains 'Ottoman', that row will be deleted also. Let's delete all rows (one, in this case) that contain the specific data we added before:

DELETE FROM ANTIQUES
WHERE ITEM = 'Ottoman' AND BUYERID = 01 AND SELLERID = 21

 

Updating Data.
Let's update a Price into a row that doesn't have a price listed yet:

UPDATE ANTIQUES SET PRICE = 500.00 WHERE ITEM = 'Chair'

This sets all Chair's Prices to 500.00. As shown above, more WHERE conditionals, using AND, must be used to limit the updating to more specific rows. Also, additional columns may be set by separating equal statements with commas.

Index   << Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next >>


If you like to see how it works enter SQL statement and press Execute

 
 

Home | Products | Downloads | Support | Contacts

Customer quotes

Once again I want to tell you how impressive your software is. I am a computer applications teacher in the school so I don't know how much praise from me means to you. All I can tell you is that it is wonderful to find software that is easy to use and works so well.

Ian Roller
Ireland

What I needed to do was build a members log in area for a web site that the user could update as new people joined. He wanted this done in two days. With not much time I downloaded this software and had the lot done in under 3 min. Normal time for this would be about 5 days and even then you would still be debuging your scripts.



Richard Murray
Web developer

Contact us:

Xlinesoft.com
Herndon, VA 20171, USA

  1-888-290-6617
  support@xlinesoft.com

  © 1999 - 2005 XLineSoft. All rights reserved. All comments send to webmaster@xlinesoft.com