Capabilities of the SELECT Statement(SELECT语句的功能):Projection(投影)、Selection(选择)、Joining(连接)

Capabilities of the SELECT Statement(SELECT语句的功能)

Data retrieval from data base is done through appropriate and efficient use of SQL. Three concepts from relational theory encompass the capability of the SELECT statement: projection, selection, and joining.

  • Projection(投影): A project operation selects only certain columns (fields) from a table. The result table has a subset of the available columns and can include anything from a single column to all available columns. (选择列的能力)
  • Selection(选择): A select operation selects a subset of rows (records) in a table (relation) that satisfy a selection condition. The ability to select rows from out of complete result set is called Selection. It involves conditional filtering and data staging. The subset can range from no rows, if none of the rows satisfy the selection condition, to all rows in a table. (从表里选择所需要的行)
  • Joinin连接): A join operation combines data from two or more tables based on one or more common column values. A join operation enables an information system user to process the relationships that exist between tables. The join operation is very powerful because it allows system users to investigate relationships among data elements that might not be anticipated at the time that a database is designed. (连接多个表)

Consider the above table structures. Fetching first_name name, department_id and salary for a single employee from EMPLOYEES table is Projection. Fetching employee details whose salary is less than 5000, from EMPLOYEES table is Selection. Fetching employee‘s first name, department name by joining EMPLOYEES and DEPARTMENTS is Joining.

Question: Identify the capabilities of SELECT statement.

  1. Projection
  2. Selection
  3. Data Control
  4. Transaction

Answer: A, B. The SELECT statement can be used for selection, projection and joining.

时间: 2024-08-04 23:13:55

Capabilities of the SELECT Statement(SELECT语句的功能):Projection(投影)、Selection(选择)、Joining(连接)的相关文章

SQL Fundamentals: Basic SELECT statement基本的select语句

Basic SELECT statement基本的select语句 The basic syntax for a SELECT statement is presented below. SELECT语句的基本语法如下. |:多选一 []:可选择的内容 {}:多选一 没有被{}括起来的是必选 SELECT [DISTINCT | ALL] {* | select_list} FROM {table_name [alias] | view_name}     [{table_name [alias

【SQL】INSERT INTO SELECT语句与SELECT INTO FROM语句

INSERT INTO SELECT语句与SELECT INTO FROM语句,都是将一个结果集插入到一个表中: #INSERT INTO SELECT语句 1.语法形式: Insert into Table2(field1,field2,…) select value1,value2,… from Table1 或 Insert into Table2 select * from Table1 2.限定条件: (1)Table2必须存在,并且字段field,field2…也必须存在: (2)如

Following a Select Statement Through Postgres Internals

This is the third of a series of posts based on a presentation I did at the Barcelona Ruby Conference called “20,000 Leagues Under ActiveRecord.” (posts: one two and video). Preparing for this presentation over the Summer, I decided to read through p

Select For update语句浅析 (转)

Select … for update语句是我们经常使用手工加锁语句.通常情况下,select语句是不会对数据加锁,妨碍影响其他的DML和DDL操作.同时,在多版本一致读机制的支持下,select语句也不会被其他类型语句所阻碍. 借助for update子句,我们可以在应用程序的层面手工实现数据加锁保护操作.本篇我们就来介绍一下这个子句的用法和功能. 下面是采自Oracle官方文档<SQL Language Reference>中关于for update子句的说明:(请双击点开图片查看) 从f

SELECT INTO 和 INSERT INTO SELECT 表复制语句

Insert是T-sql中常用语句,Insert INTO table(field1,field2,...) values(value1,value2,...)这种形式的在应用程序开发中必不可少.但我们在开发.测试过程中,经常会遇到需要表复制的情况,如将一个table1的数据的部分字段复制到table2中,或者将整个table1复制到table2中,这时候我们就要使用SELECT INTO 和 INSERT INTO SELECT 表复制语句了. 1.INSERT INTO SELECT语句 语

Select Statement Syntax [AX 2012]

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 SelectStatement = select Parameters Parameters   [ [  FindOptions  ] [  FieldList  from ] ] TableBufferVaria

PHP MySQL Select 之Select

从数据库表中选取数据 SELECT 语句用于从数据库中选取数据. 语法 SELECT column_name(s) FROM table_name 注释:SQL 语句对大小写不敏感.SELECT 与 select 等效. 为了让 PHP 执行上面的语句,我们必须使用 mysql_query() 函数.该函数用于向 MySQL 发送查询或命令. 例子 下面的例子选取存储在 "Persons" 表中的所有数据(* 字符选取表中所有数据): <?php $con = mysql_con

Oracle中insert into select和select into的用法(转)

原文地址:http://hi.baidu.com/huahua035/item/87d5e71e6a7d31f187ad4ea5 两张表进行数据的拷贝,最常用的拷贝语句是: insert into select  和 select into from 但是请绝对的注意: 在Oracle中select into from不可以使用-----原因很简单:select into是PL/SQL language 的赋值语句!如果使用则Oracle会抛出0RA-00905:missing keyword的

SQL笔记1:SELECT及SELECT高级应用

T-SQL笔记1:SELECT及SELECT高级应用 本章摘要 1:安装AdventureWorks 2:基本运算符和表达式 3:between 4:like 5:escape 6:TOP 7:GROUP BY 7.1:GROUP BY ALL 7.2:HAVING 8:SELECT字句技术 8.1:使用DISTINCT消除重复值 8.2:返回拼接的结果 8.3使用INTO字句 9:子查询 9.1:子查询类型 9.2:代替表达式的查询 9.3:多层嵌套 10:比较使用 EXISTS 和 IN 的