answersLogoWhite

0


Best Answer

where

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What SQL clause is used to restrict the rows returned by a query?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Law

List out Codd's rules for Relational Databases?

The rulesRule 0: The system must qualify as relational, as a database, and as a management system.For a system to qualify as a relational database management system (RDBMS), that system must use its relational facilities (exclusively) to manage the database. Rule 1: The information rule:All information in the database is to be represented in one and only one way, namely by values in column positions within rows of tables.Rule 2: The guaranteed access rule:All data must be accessible. This rule is essentially a restatement of the fundamental requirement for primary keys. It says that every individual scalar value in the database must be logically addressable by specifying the name of the containing table, the name of the containing column and the primary key value of the containing row.Rule 3: Systematic treatment of null values:The DBMS must allow each field to remain null (or empty). Specifically, it must support a representation of "missing information and inapplicable information" that is systematic, distinct from all regular values (for example, "distinct from zero or any other number", in the case of numeric values), and independent of data type. It is also implied that such representations must be manipulated by the DBMS in a systematic way.Rule 4: Active online catalog based on the relational model:The system must support an online, inline, relational catalog that is accessible to authorized users by means of their regular query language. That is, users must be able to access the database's structure (catalog) using the same query language that they use to access the database's data.Rule 5: The comprehensive data sublanguage rule:The system must support at least one relational language thatHas a linear syntaxCan be used both interactively and within application programs,Supports data definition operations (including view definitions), data manipulation operations (update as well as retrieval), security and integrity constraints, and transaction management operations (begin, commit, and rollback).Rule 6: The view updating rule:All views that are theoretically updatable must be updatable by the system.Rule 7: High-level insert, update, and delete:The system must support set-at-a-time insert, update, and delete operators. This means that data can be retrieved from a relational database in sets constructed of data from multiple rows and/or multiple tables. This rule states that insert, update, and delete operations should be supported for any retrievable set rather than just for a single row in a single table.Rule 8: Physical data independence:Changes to the physical level (how the data is stored, whether in arrays or linked lists etc.) must not require a change to an application based on the structure.Rule 9: Logical data independence:Changes to the logical level (tables, columns, rows, and so on) must not require a change to an application based on the structure. Logical data independence is more difficult to achieve than physical data independence.Rule 10: Integrity independence:Integrity constraints must be specified separately from application programs and stored in the catalog. It must be possible to change such constraints as and when appropriate without unnecessarily affecting existing applications.Rule 11: Distribution independence:The distribution of portions of the database to various locations should be invisible to users of the database. Existing applications should continue to operate successfully :when a distributed version of the DBMS is first introduced; andwhen existing distributed data are redistributed around the system.Rule 12: The nonsubversion rule:If the system provides a low-level (record-at-a-time) interface, then that interface cannot be used to subvert the system, for example, bypassing a relational security or integrity constraint.


Related questions

What is the difference between union and intersect operations in SQL?

In SQL, the UNION operation combines the result sets of two or more queries into a single result set, removing any duplicate rows. The INTERSECT operation returns only the common rows that appear in both result sets of two or more queries.


How are all rows in a table selected?

All rows & columns in a table can be selected by using the below query Select * from table_name If you do not have any where condition in the query then all rows will be selected.


Which is more important in a sql query IN or EXISTS?

EXISTS is more efficient that IN , Because EXISTS use indexes of the table and hence scans the table faster, as well as it returns the boolean value (T or F), If T is received for EXISTS clause than the rows will be returned otherwise not. where as IN works as simple query where it will scan all possible values in the table and than compares the condition given by you and then the result.


How do you set up ascending and descending order in a table and a query?

I'm actually not familiar with Access, but I'll try to help. Usually the primary key will physically order the rows in a database table. In SQL-query you can use "order by" clause. The default order is usually ascending. You can also add "asc" or "desc" after the column name. Please do notice, primary keys are not for ordering rows. You should really let the database decide how to save the rows. You should always order the rows in your query (if needed), not modify or trust the physical order! select col1 from foo order by col2 select col1 from foo order by col2 desc, col3 asc


What basic clause in an SQL statement is used to retrieve rows and columns from tables?

The SELECT clause is used to retrieve rows and columns from tables. Ex: Select * from employee


What is Criteria of the Query?

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


What two options do you use with the on commit clause when creating a global temporary table?

KEEP ROWS and PURGE ROWS


Do you have a table without rows?

You can have a table without rows. It would be an empty table with no data. select (*)count from TABLENAME; 0 rows returned.


Where clause restricts rows prior to inclusion in a group calculation?

TRUE


What impact does normalization have on writing queries?

The most important thing about normalization of tables in a database for the purposes of query writing is to allow only the data wanted to be returned and you don't end up with what is called a Cartesian product... where it is possible that all rows are returned in error because the keys from table to table are not normalized correctly.


Why selection query is first done than projection query?

Selection has more power to reduce size (Number of rows) while projection can not reduce number of tuples


What clause should be used to display the rows of a table in ascending order of a particular column?

Order by