OCP 1Z0 051 121
来源:互联网 发布:网页视频录制软件 编辑:程序博客网 时间:2024/06/05 20:09
121. Which two statements are true regarding the USING clause in table joins? (Choose two .)
A. It can be used to join a maximum of three tables.
B. It can be used to restrict the number of columns used in a NATURAL join.
C. It can be used to access data from tables through equijoins as well as nonequijoins.
D. It can be used to join tables that have columns with the same name and compatible data types.
join语句每次都只能join俩表
当两个表列名相同时可以使用USING 与 NATURAL JOIN
USING 与 NATURAL JOIN 都只能用于等值连接
USING 与 NATURAL JOIN 不能同时使用
有些地方说列类型不同时不能使用natural join,该说法错误
当只使用部分相同列时可以使用USING
Answer: BD
A. It can be used to join a maximum of three tables.
B. It can be used to restrict the number of columns used in a NATURAL join.
C. It can be used to access data from tables through equijoins as well as nonequijoins.
D. It can be used to join tables that have columns with the same name and compatible data types.
join语句每次都只能join俩表
当两个表列名相同时可以使用USING 与 NATURAL JOIN
USING 与 NATURAL JOIN 都只能用于等值连接
USING 与 NATURAL JOIN 不能同时使用
SQL> create table emp2 as select empno,ename from emp;Table createdSQL> create table emp3 as select empno,deptno from emp;Table createdSQL> select * from emp2 natural join emp3; EMPNO ENAME DEPTNO---------- ---------- ---------- 7369 SMITH 20 7499 ALLEN 30 7521 WARD 30 7566 JONES 20 7654 MARTIN 30 7698 BLAKE 30 7782 CLARK 10 7788 SCOTT 20 7839 KING 10 7844 TURNER 30 7876 ADAMS 20 7900 JAMES 30 7902 FORD 20 7934 MILLER 1014 rows selected
有些地方说列类型不同时不能使用natural join,该说法错误
SQL> drop table emp3 purge;Table droppedSQL> create table emp3 as select to_char(empno) as empno,deptno from emp;Table createdSQL> select * from emp2 natural join emp3;EMPNO ENAME DEPTNO---------------------------------------- ---------- ----------7369 SMITH 207499 ALLEN 307521 WARD 307566 JONES 207654 MARTIN 307698 BLAKE 307782 CLARK 107788 SCOTT 207839 KING 107844 TURNER 307876 ADAMS 207900 JAMES 307902 FORD 207934 MILLER 1014 rows selected
当只使用部分相同列时可以使用USING
SQL> drop table emp2 purge;Table droppedSQL> drop table emp3 purge;Table droppedSQL> create table emp2 as select * from emp;Table createdSQL> create table emp3 as select * from emp;Table createdSQL> select empno,emp2.ename,emp3.comm from emp2 join emp3 using(empno); EMPNO ENAME COMM---------- ---------- ---------- 7369 SMITH 7499 ALLEN 300 7521 WARD 500 7566 JONES 7654 MARTIN 1400 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 0 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER 14 rows selected
Answer: BD
0 0
- OCP 1Z0 051 121
- OCP 1Z0 052 121
- OCP 1Z0 053 121
- OCP 1Z0 051 1
- OCP 1Z0 051 2
- OCP 1Z0 051 3
- OCP 1Z0 051 4
- OCP 1Z0 051 5
- OCP 1Z0 051 6
- OCP 1Z0 051 7
- OCP 1Z0 051 8
- OCP 1Z0 051 9
- OCP 1Z0 051 10
- OCP 1Z0 051 11
- OCP 1Z0 051 12
- OCP 1Z0 051 13
- OCP 1Z0 051 14
- OCP 1Z0 051 15
- 马程序员学习笔记——java常用字符集
- 重定向dup、管道 进程间通信
- 时间,回不到最初的地方
- 欧拉回路,欧拉路
- 郎咸平的文章,是对现在中国股市的精辟分析!!
- OCP 1Z0 051 121
- 基于vc的数字图像分割——基于阙值的分割方法
- 第四周
- SQLite可视化管理工具汇总
- 第十三周项目2--圆的比较
- REcord BBC
- 计算几何题目
- 南宁激光脱毛价格表 广西武警整形美容中心
- jquery为何要根据当前点击元素来寻找其他元素