Check the above site. it has a good set of lessions on SQL. to be more specific, TSQL.
THis is just not tutorilal, it also has feature "practice what you learn using the on-line SQL interpreter". You will receive immediate results after submitting your SQL commands. Starting from Basics it shows you to write complex queries.
All the Best
hey thanks for the post im looking for a sql tutorial and finally i spotted this section...hehehehe i will surf that
hey thankz for the post buddy.nice one
Its always a pleasure sharing knowledge. If you want more tutorials on SQL just PM me I will send you more.
very nice. Thanks for sharing i've been looking for a tutorial like this for a long time
i think my sql is quite difficult to learn
thx for sharing
it is quite useful and i will bookmark it
Thanks guys !
Your support keeps me posting good tutorials !
This is a really nice tutorial, I´ll be looking further into that later.
I don't understand a thing. Could someone tell me exactly what SQL is? in english--english.....not english -- codes
|engeland wrote: |
|I don't understand a thing. Could someone tell me exactly what SQL is? in english--english.....not english -- codes |
SQL keywords fall into several groups.
The most frequently used operation in transactional databases is the data retrieval operation.
* SELECT is used to retrieve zero or more rows from one or more tables in a database. In most applications, SELECT is the most commonly used DML command. In specifying a SELECT query, the user specifies a description of the desired result set, but they do not specify what physical operations must be executed to produce that result set. Translating the query into an optimal query plan is left to the database system, more specifically to the query optimizer.
o Commonly available keywords related to SELECT include:
+ FROM is used to indicate which tables the data is to be taken from, as well as how the tables join to each other.
+ WHERE is used to identify which rows to be retrieved, or applied to GROUP BY.
+ GROUP BY is used to combine rows with related values into elements of a smaller set of rows.
+ HAVING is used to identify which rows, following a GROUP BY, are to be retrieved.
+ ORDER BY is used to identify which columns are used to sort the resulting data.
First there are the standard Data Manipulation Language (DML) elements. DML is the subset of the language used to add, update and delete data.
* INSERT is used to add zero or more rows (formally tuples) to an existing table.
* UPDATE is used to modify the values of a set of existing table rows.
* MERGE is used to combine the data of multiple tables. It is something of a combination of the INSERT and UPDATE elements.
* DELETE removes zero or more existing rows from a table.
* TRUNCATE deletes all data from a table (non-standard, but common SQL command).
Transaction, if available, can be used to wrap around the DML operations.
* BEGIN WORK (or START TRANSACTION, depending on SQL dialect) can be used to mark the start of a database transaction, which either completes completely or not at all.
* COMMIT causes all data changes in a transaction to be made permanent.
* ROLLBACK causes all data changes since the last COMMIT or ROLLBACK to be discarded, so that the state of the data is "rolled back" to the way it was prior to those changes being requested.
COMMIT and ROLLBACK interact with areas such as transaction control and locking. Strictly, both terminate any open transaction and release any locks held on data. In the absence of a BEGIN WORK or similar statement, the semantics of SQL are implementation-dependent.
The second group of keywords is the Data Definition Language (DDL). DDL allows the user to define new tables and associated elements. Most commercial SQL databases have proprietary extensions in their DDL, which allow control over nonstandard features of the database system.
The most basic items of DDL are the CREATE and DROP commands.
* CREATE causes an object (a table, for example) to be created within the database.
* DROP causes an existing object within the database to be deleted, usually irretrievably.
Some database systems also have an ALTER command, which permits the user to modify an existing object in various ways -- for example, adding a column to an existing table.
The third group of SQL keywords is the Data Control Language (DCL). DCL handles the authorisation aspects of data and permits the user to control who has access to see or manipulate data within the database.
Its two main keywords are:
* GRANT - authorises a user to perform an operation or a set of operations e.g. grant all privileges to user identified by passwd?
* REVOKE - removes or restricts the capability of a user to perform an operation or a set of operations.
Database systems using SQL
* List of SQL database management systems
* List of object-relational database management systems
Criticisms of SQL
Technically, SQL is a declarative computer language for use with "relational databases". Theorists note that many of the original SQL features were inspired by, but in violation of, tuple calculus. Recent extensions to SQL achieved relational completeness, but have worsened the violations, as documented in The Third Manifesto.
In addition, there are also some criticisms about the practical use of SQL:
* The language syntax is rather complex (sometimes called "COBOL-like").
* It does not provide a standard way to split large commands into multiple smaller ones that reference each other by name (however some implementations allow for set-based functions to grant this functionality). This tends to result in "run-on SQL sentences".
* Implementations are inconsistent and, at times, incompatible between vendors.
* It is at times too difficult a syntax for DBAs (database administrators) to extend.
* Over-reliance on "NULLs", which some consider a flawed or over-used concept.
* For larger statements, it is often difficult to factor repeated patterns and expressions into one or fewer places to avoid repetition and avoid having to make the same change to different places in a given statement.
* Unexplained difference between value-to-column assignments in UPDATE and INSERT syntax.
Alternatives to SQL
A distinction should be made between alternatives to relational and alternatives to SQL. The list below are proposed alternatives to SQL, but are still (allegedly) relational. See navigational database for alternatives to relational.
* IBM BS12
* TQL Proposal (Not to be confused with Luca Cardelli's TQL)
* Hibernate Query Language (HQL) - A Java-based tool that uses modified SQL
* Quel introduced in 1974 by the U.C. Berkeley Ingres project.
* The 1995 SQL Reunion: People, Projects, and Politics (early history of SQL)
* BiteSize Inc.'s Learn SQL tutorial
* A Gentle Introduction to SQL at SQLzoo
* SQL Tutorial
* SQL Help and Tutorial
Why thank you, very helpful.
Nice link share. Going to check it. . .