devxlogo

Executing SQL Statements

Executing SQL Statements

Question:
How do I perform INSERTS, UPDATES andDELETES on existing tables? I have looked up the help andin 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 = 10DELETE FROM SUPPLIERS WHERE id = 10

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist