Difference between revisions of "Portable SQL/Statements/Data manipulation"

From Linuxnetworks
Jump to: navigation, search
(removed backlink)
 
Line 18: Line 18:
 
  DELETE FROM ''table''
 
  DELETE FROM ''table''
 
  WHERE ''conditions''
 
  WHERE ''conditions''
 
 
----
 
Back to [[OpenDBX|Overview]]
 

Latest revision as of 15:06, 22 June 2008

The data manipulation statements provided by the database vendors are pretty much standard compliant as long as their base form is used. They can be feed to almost every SQL DBMS without having to worry about portability.

The only thing to care about is the where-clause of the UPDATE and the DELETE statement. Keep sure to avoid anything but simple operators and boolean statements like AND/OR.

INSERT statement

INSERT INTO table ( column [,column]* )
VALUES ( value [,value]* )

UPDATE statement

UPDATE table
SET column=value [,column=value]*
WHERE conditions

DELETE statement

DELETE FROM table
WHERE conditions