Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SQL
Edit
PageHistory
Diff
Info
LikePages
You are viewing an old revision of this page.
View the current version
.
[Acronym] for __S__tructured __Q__uery __L__anguage. Some database professionals think the S should stand for 'stupid'. SQL is a set-centric ProgrammingLanguage in which statements are excuted over a [Schema] of relations (tables), and return a set of results. !!Syntax & examples In this example, imagine we have a table called 'users' which has links an 'id', a 'name' and an 'accesslevel'. __Retrieving data:__ <tt>SELECT ''cols'' FROM ''tables'' WHERE ''condition''</tt>%%%eg to find the access level of user number 154: <tt>SELECT accesslevel FROM users WHERE id = 154;</tt> __Inserting data:__ <tt>INSERT INTO ''table'' (''columns'') VALUES (''values'')</tt>%%%eg to add a new user: <tt>INSERT INTO users (name, accesslevel) VALUES ('Craig', 10);</tt> - the next available ID number is automatically assigned. __Updating data:__ <tt>UPDATE ''table'' SET ''column''=''value'' WHERE ''condition''</tt>%%%eg to set an accesslevel of 15 to everyone whos name starts with a C: <tt>UPDATE users SET accesslevel=15 WHERE name LIKE 'C%';</tt> __Removing data:__ <tt>DELETE FROM ''table'' WHERE ''condition''</tt>%%%eg Remove user with ID number 30: <tt>DELETE FROM users WHERE id = 30;</tt> ---- CategoryProgrammingLanguages, CategorySpecialPurposeProgrammingLanguages
23 pages link to
SQL
:
SubSelect
WinFs
ODBC
RAD
PostRelationalDataBase
JDBC
WAL
WaikatoCourseDescriptions
RelationalDataBase
DB2
FlatFiles
MicrosoftAccess
FreeRADIUSNotes
Schema
XMLDataBase
HierarchicalDataBase
CarlWyles
XML
NSS
MySQL
LDAP
PostgreSQL
PostgreSQLNotes