You apply criteria to queries using the WHERE clause.
ex: Select * from tbl_emp
This query would fetch all rows from the table tbl_emp
Select * from tbl_emp where emp_name = "Rocky"
This query would fetch all rows from the table that have employee name as Rocky
The criteria is a set of filters that will be applied to the result set. For example, a user might want to find all rows in a table that have the first name "John", or find all phone numbers in the 415 area code. Multiple filters can be combined to provide an even more concise list, or can be broadened to find items that meet any of a set of criteria.
If the criteria is entered in by the user as the query is run, by prompting the user, then it is a Parameter query. Criteria can also be built direct into the query in which case it is a standard Select query.
A select query with multiple criteria
query
A query is a request for specific data from a database. It is written in a structured query language (SQL) and is used to retrieve information based on specific criteria or conditions defined in the query. The query command searches the database for records that match the criteria specified in the query and returns the results in a structured format.
compound criteria
a parameter query is a query that prompts the user to enter specific criteria every time the query is run. When building the query, you would enter the prompt in the criteria line under the field you want the information to be filtered from. For example, if you wanted to look at items that sold on a specific date each time you ran the query, your criteria line would look like this: [enter date of sale] So when you ran the query, before your results even appeared, a parameter box would pop up telling you "enter date of sale", the user would enter the date and then the filtered criteria of the query results will show.
a parameter query is a query that prompts the user to enter specific criteria every time the query is run. When building the query, you would enter the prompt in the criteria line under the field you want the information to be filtered from. For example, if you wanted to look at items that sold on a specific date each time you ran the query, your criteria line would look like this: [enter date of sale] So when you ran the query, before your results even appeared, a parameter box would pop up telling you "enter date of sale", the user would enter the date and then the filtered criteria of the query results will show.
A query datasheet displays the results of a query operation, showing data based on specified criteria or calculations. A table datasheet displays the data in a table format, representing information stored in a database table. In essence, a query datasheet is derived from a table datasheet and is dynamic based on the query criteria.
Syntax
A query is a way of extracting information from a database, usually by using certain criteria or requesting certain data
Criteria determine what records can be shown, not what fields can be shown, so the AND criteria cannot be used to determine what fields to select.
a select query