views
'SQL' is usually pronounced 'S-Q-L' (Structured Query Language). SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. This version was called SEQUEL (Structured English Query Language).
There are various dialects of SQL but the most widely used database engines today adhere to the SQL99 standard from ANSI, and many vendors have implemented extra features to extend that standard (the Microsoft 'flavor' of SQL is called T-SQL or Transact-SQL, the Oracle version is PL/SQL).
Getting the Data Out! This is what it usually is all about. For this we use the SELECT statement; it will query or retrieve data from an SQL database.
A simple example would be something like: 'select * from tblMyCDList' which would get all columns (that's where the * comes in) and rows in the table 'tblMyCDList'.
Queries are usually much more complicated than this. The select can be used to tease out particular columns and rows out of a table and even link data from multiple tables or, for that matter, databases together.
If we want to filter the rows returned by the select statement, a where clause is needed to qualify the record sets returned. 'select * from tblMyCDList where CDid = 27' will retrieve the rows where the field CDid is equal to 27. Or 'select * from tblAttribute where strCDName like 'Dark Side%' ' uses a wild card representing zero or more instances of any character and will hopefully show that my collection does have my favorite Pink Floyd album.
INSERT and UPDATE statements are used to add and change data in an SQL database (check the links below for some excellent tutorials that can take you further).
The DELETE statement is used to remove data from an SQL database.
Comments
0 comment