| What is SQL? SQL stands for Structured
| |
| | table data3. Manipulate the table dataSQL
|
| Query Language and is the lingua franca
| |
| | is predominantly used by 2 types of users
|
| in the database world. SQL is a standard
| |
| | - programs and humans (keying in the
|
| that is used by all database vendors and
| |
| | commands through a database client) - to
|
| programmers to define, extract and access
| |
| | pass instructions to databases. SQL
|
| the information that is stored in
| |
| | commands can be keyed into a database
|
| databases. SQL began life as an IBM
| |
| | client like the MySQL Query Browser or
|
| creation but was standardized by the
| |
| | the SQL Server Enterprise Manager and
|
| American National Standards Institute
| |
| | executed to either return a result or
|
| (ANSI) and the International
| |
| | modify records in the database. SQL can
|
| Organization for Standardization (ISO) as
| |
| | also be used in conjunction with
|
| ANSI/ISO SQL in 1988. Since then ANSI/ISO
| |
| | programming language or scripting
|
| SQL standard continued to evolve. The
| |
| | language like Microsoft Visual Basic or
|
| ANSI-SQL group has since published three
| |
| | PHP to communicate with the
|
| standards over the years:1. SQL89
| |
| | database.Although SQL is a world
|
| (SQL1)2. SQL92 (SQL2)3. SQL99 (SQL3)SQL
| |
| | standard, it is unfortunate that most
|
| is a query language. It is English-like
| |
| | database vendors have come up with
|
| and easy to use. However, although there
| |
| | different dialects and variations. This
|
| are more than 90 SQL reserved words,
| |
| | is because every database vendor wants to
|
| most programmers seldom use more than the
| |
| | differentiate their database products
|
| following handful of commands - SELECT,
| |
| | from the crowd. One good example is
|
| INSERT, UPDATE, DELETE, FROM, WHERE,
| |
| | Microsoft SQL Server's TRANSACT-SQL.
|
| HAVING, BETWEEN, LIKE, OR, AND, NOT, IN,
| |
| | TRANSACT-SQL is a superset of SQL and is
|
| ORDER, GROUP and BY.For example, if you
| |
| | designed for use only with Microsoft SQL
|
| had a database table named "employees"
| |
| | Server. Although it does make programming
|
| and you wanted to retrieve all records
| |
| | much easier for software developers, it
|
| where the employee has the last name
| |
| | is not compliant with other databases
|
| "goodman", you would use the following
| |
| | like Oracle or MySQL - making
|
| SQL statement:SELECT * FROM employees
| |
| | TRANSACT-SQL programs non
|
| WHERE lastname = 'goodman';There are many
| |
| | database-portable. As such, although many
|
| different categories of SQL statements
| |
| | of these features are powerful and
|
| but the basic ones which all programmers
| |
| | robust, it is good practice to exercise
|
| should be familiar with are the SQL
| |
| | caution and limit your SQL use to be
|
| statements that:1. Create tables and
| |
| | compliant with the ANSI/ISO SQL
|
| manipulate their definitions2. Query the
| |
| | standards and ODBC-Compliant.
|