Professional Documents
Culture Documents
QUERIES
What is a Query ?
A query is like a simple question that is asked to find specific
information from the database.
For example, which students are scoring above 85% marks?
Which students live in sector 14, Vasundhara ?
Queries are made on tables and the result of a query is also
displayed in the form of a table.
MS-Access provides various types of queries :
Select, Parameter, Crosstab, Action Query & SQL.
To enable a query with more than one table to return meaningful results, the two tables
must be linked by a relationship.
Query criteria helps you to retrieve specific items from an Access database. If an item
matches with all the criteria you enter, it appears in the query results.
A query criterion is an expression that Access compares to query field values to determine
whether to include the record that contains each value.
Structured Query Language(SQL) is SQL commands are mainly categorized
into four categories as:
the database language by the use of
and also we can use this language to DQl – Data Query Language
SELECT INSERT
SELECT(column1, column2…) FROM INSERT INTO table(column1,
table_name column2…)VALUES(value1, value2…)
[WHERE condition]
[ORDER BY column] Example :
Example : Insert into student( “Roll no”, “Marks”)
Select * from “students” Values (15, 80)
UPDATE
UPDATE table_name SET column_name =
value[column_name=value..]
[WHERE condition]
DDL DML
DDL is Data Definition Language which is used to define data DML is Data Manipulation Language which is used to
structures. For example: create table, alter table are manipulate data itself. For example: insert, update, delete
instructions in SQL. are instructions in SQL.
CREATE
DELETE CREATE TABLE table_name
DELETE FROM “table_name” ([column definition])
[WHERE condition] [table parameters]
Example : Example :
Delete from “Student” where “Rollno”=“10” Create table “Library”(Book_No”integer,
“Book_name”varchar(50),
“category”varchar(40))
Reports have three types of sections :