Portable SQL/Statements/Data manipulation

From Linuxnetworks
< Portable SQL
Revision as of 15:06, 22 June 2008 by Nose (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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