Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Executing SQL Statements

Question:
How do I perform INSERTS, UPDATES and DELETES on existing tables? I have looked up the help and in books but nothing seems to tell me exactly how to do it.

Answer:
Those statements are fairly easy to do...you just have to have the correct syntax, which is all documented in the Professional Features Books and in the online help files. Here is an example INSERT, DELETE, and UPDATE:

INSERT INTO SUPPLIERS (field1, field2, field3) VALUES (value1, value2, value)
Put that statement into an ExecuteSQL command, and it will run. field1 - field3 are the fields you are filling, and value1 - value3 are the corresponding values.
UPDATE SUPPLIERS SET field1 = value1, field2 = value2 WHERE id = 10


DELETE FROM SUPPLIERS WHERE id = 10
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date