PPT: SQL

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


Structured Query 
Language
Page 2


Structured Query 
Language
Introduction to SQL
What is SQL?
– When a user wants to get some information 
from a database file, he can issue a query. 
1
– A query is a user –request to retrieve data or 
information with a certain condition.
– SQL is a query language that allows user to 
specify the conditions. (instead of algorithms)
Page 3


Structured Query 
Language
Introduction to SQL
What is SQL?
– When a user wants to get some information 
from a database file, he can issue a query. 
1
– A query is a user –request to retrieve data or 
information with a certain condition.
– SQL is a query language that allows user to 
specify the conditions. (instead of algorithms)
Introduction to SQL
Concept of SQL
– The user specifies a certain condition.
1
– The result of the query will then be stored in 
form of a table.
– Statistical information of the data.
– The program will go through all the records 
in the database file and select those records 
that satisfy the condition.(searching).
Page 4


Structured Query 
Language
Introduction to SQL
What is SQL?
– When a user wants to get some information 
from a database file, he can issue a query. 
1
– A query is a user –request to retrieve data or 
information with a certain condition.
– SQL is a query language that allows user to 
specify the conditions. (instead of algorithms)
Introduction to SQL
Concept of SQL
– The user specifies a certain condition.
1
– The result of the query will then be stored in 
form of a table.
– Statistical information of the data.
– The program will go through all the records 
in the database file and select those records 
that satisfy the condition.(searching).
Introduction to SQL
How to involve SQL in FoxPro
– Before using SQL, the tables should be 
opened.
1
– The SQL command can be entered directly 
in the Command Window
– To perform exact matching, we should  SET 
ANSI ON
Page 5


Structured Query 
Language
Introduction to SQL
What is SQL?
– When a user wants to get some information 
from a database file, he can issue a query. 
1
– A query is a user –request to retrieve data or 
information with a certain condition.
– SQL is a query language that allows user to 
specify the conditions. (instead of algorithms)
Introduction to SQL
Concept of SQL
– The user specifies a certain condition.
1
– The result of the query will then be stored in 
form of a table.
– Statistical information of the data.
– The program will go through all the records 
in the database file and select those records 
that satisfy the condition.(searching).
Introduction to SQL
How to involve SQL in FoxPro
– Before using SQL, the tables should be 
opened.
1
– The SQL command can be entered directly 
in the Command Window
– To perform exact matching, we should  SET 
ANSI ON
Basic structure of an SQL 
query
2
General
Structure
SELECT,  ALL / DISTINCT,  *,
AS,  FROM,  WHERE
Comparison
IN,  BETWEEN,  LIKE "% _"
Grouping
GROUP BY,  HAVING,
COUNT( ), SUM( ), AVG( ), MAX( ), MIN( )
Display Order
ORDER BY,  ASC / DESC
Logical
Operators
AND,  OR,  NOT
Output
INTO TABLE / CURSOR
TO FILE [ADDITIVE],  TO PRINTER,  TO SCREEN
Union
UNION
Read More
Explore Courses for Computer Science Engineering (CSE) exam
Related Searches
video lectures, Important questions, past year papers, Free, Extra Questions, pdf , Summary, study material, PPT: SQL, Objective type Questions, Semester Notes, Previous Year Questions with Solutions, shortcuts and tricks, PPT: SQL, Sample Paper, ppt, practice quizzes, PPT: SQL, mock tests for examination, Viva Questions, MCQs, Exam;