English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-08-25 19:54:28 · 4 answers · asked by shu_pim 1 in Computers & Internet Programming & Design

4 answers

This is REALLY basic stuff because there is SO much to know about SQL. I do quite a lot of T-SQL for my job.

SQL = Structured query language

There are different versions, but the most common are T-SQL (microsoft) and PL-SQL (oracle)

There are four basic commands that are used to get and manipulate data in tables. Insert, Update, Delete, Select

Insert - inserts records into tables, it's basic syntax is like this,
insert into tableName (field1, field2, field3, ...)
values ('value1', ' value2', 'value3')

Update - Updates records in tables.its basic syntax is like this.
update tableName
set field1 = 'value1', field2 = 'value2', field3 = 'value3'
where field6 = 'value6' and field7 = 'value7'

Delete = Deletes records in tables, its basic syntax is like this.
delete tableName
where field6 = 'value6' and field7 = 'value7'

Select = Gets data from tables. Its basic syntax is like
Select field1, field2, field3
from tableName
where field6 = 'value6' and field7 = 'value7'

There are chunks of code that you can write and store them in stored procedures, or user defined functions

T-SQL and PL-SQL code is difficult to use because of many strict requirements, however they are run against the server and can be very fast. You do not have arrays, the only looping command is a while loop. Strings (called char or varchar types) are limited to 8000 characters in length.

In the SQL Server 2005 from Microsoft, they have added the ability to write code in Visual Studio.NET to be used as stored procedures and user defined functions.

SQL is frequently used in web pages and applications to manipulate data in a database.

"SQL Management Studio" was release by Microsoft a few months ago and is the latest client tool to run queries against a SQL database.

2006-08-25 20:08:28 · answer #1 · answered by Michael M 6 · 0 0

As an introduction to any version of SQL, I highly recommend the book "Sams Teach Yourself SQL in 10 Minutes". It gives the basics of what you'll need to dive write in and start writing SQL queries, broken up into easy to read 10-15 minute lessons. Once you've read it, buy a more detailed reference book for the specific database and version you're using.

2006-08-29 15:32:17 · answer #2 · answered by Blueghost73 3 · 0 0

Yeah, what Michael M said is pretty good, but he seems to know a bit too much about MS products, which are inherently evil.

SQL (pronounced 'sequel') itself is vendor-neutral; it was defined by ANSI, back when ANSI did useful things like defining languages. T-SQL and PL/SQL are just dialects; MySQL is another which works just as well and is free. Most SQL dialects follow the same syntax for all basic operations. SELECT does the same thing in all versions, as do CREATE, ALTER, or DROP TABLE. The dialects only differ when you get into operations that were never defined by ANSI-SQL, but are nonetheless useful. For example, PL/SQL has the operator INTERSECT, as in
SELECT col_x FROM table_a
INTERSECT
SELECT col_x FROM table_b;
This gives you all the values from table_a that are also in table_b. Trying to get the same result from MySQL, which doesn't have this operator, is a pain in the ***.

2006-08-25 20:41:16 · answer #3 · answered by abram.kelly 4 · 0 0

this might be incorrect but i believe its sigma quality limit. It's a rule or procedure that any and all data within 2 sigma of the average are within quality limits. you've posted in programming so it might be a different meaning......if so, hope you find your answer.

2006-08-25 19:59:51 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers