Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
P. 1
SQL

SQL

Ratings: (0)|Views: 9|Likes:
Published by Xanthopus

More info:

Published by: Xanthopus on Aug 23, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

09/21/2014

pdf

text

original

 
SQL stands for Structured Query Language and is used to access and manipulate informationfrom databases
SQL
SQL allows users to access data in relational database management systems, such asOracle,Informix,Sybase, Microsoft SQL Server, Access etc.
SQL allows users to manipulate and define the data in a database.
SQL is an ANSI standard computer language
Strucured Query Language
SQL may frequently pronounced “sequel” but the alternate pronunciation “S.Q.L.” is also used.As the name implies, SQL is a computer language that you use to interact with a database. Infact, SQL works with a specific type of database, called a relational database.SQL is more than a query tool, although that was its original purpose, and retrieving data is stillone of its most important functions. SQL is used to control all of the functions of DBMS which provides for its users, including:
Data Definition Language.
In DDL user define the structure and organization of thestored data and relationships among the stored data items.
Data Retrieval Language.
An application program to retrieve stored data from thedatabase and use it.
Data Manipulation Language.
DML allows a user or an application program to updatethe database by adding new data, removing old data, and modifying previously storeddata.
Data Control Language.
DCL can be used to restrict a user’s ability to retrieve, add, andmodify data, protecting stored data against unauthorized access.
Data sharing.
Is used to coordinate data sharing by concurrent users, ensuring that theydo not interfere with one another.
Data intigrity.
It defines integrity constraints in the database, protecting it from
 
corruption due to inconsistent updates or system failures.
SQL Queries
Query is a loose term that refers to a widely available set of SQL commands called clauses. Eachclause or command performs some sort of function against the database. For instance, the createclause creates tables in databse and the select clause selects rows that have been inserted intoyour tables.Construction of Query begins with one of the following clauses:
Add
Drop
Create
Insert
Select
Update
Replace
DeleteSQL Query SyntaxThe syntax of a query is loose, meaning you are free to place line breaks and spacing where you please without injuring the code.Few instances require parentheses, including the insertstatement listed below. Parentheses will also be covered during our Functions lesson. Be sure toend all query statements with a semicolon (;).SQL Code:SELECT * FROM table_name;
SQL Select Statement
 
SEARCH TUTORIALS:
 
Search
Select Command
Select command is use to select data from the tables located in a database.If we need to SELECTinformation FROM a table.The most basic SQL structure:
A D V E R T I S E M E N T
SELECT "column_name" FROM "table_name" To illustrate the above example, assume that we have the following table Name
"Store_Information" :
store_nameSalesDateLos Angeles$1500Jan-05-2005San Diego$250Jan-07-2005Los Angeles$300Jan-08-2005Boston$700Jan-08-2005 To select all the stores inthis tableSELECT store_name FROM Store_Information
þÿ

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->