59.View the Exhibit and examine the data in the PRODUCTS table.
来源:互联网 发布:游戏原画网络班 编辑:程序博客网 时间:2024/05/16 11:02
59.View the Exhibit and examine the data in the PRODUCTS table.
You need to display product names from the PRODUCTS table that belong to the 'Software/Other '
category with minimum prices as either $2000 or $4000 and no unit of measure.
You issue the following query:
SQL>SELECT prod_name, prod_category, prod_min_price
FROM products
WHERE prod_category LIKE '%Other%' AND (prod_min_price = 2000 OR
prod_min_price = 4000) AND prod_unit_of_measure <> '';
Which statement is true regarding the above query?
A.It executes successfully but returns no result.
B.It executes successfully and returns the required result.
C.It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is not valid.
D.It generates an error because the condition specified for the PROD_CATEGORY column is not valid.
答案:A
解析:''相当于null,null不能通过= <>来判断,只能通过 is来判断,因此prod_unit_of_measure <> ''始终为false
SQL> set feedback on
SQL> select 1 from dual where 1 <> '';
no rows selected
SQL> select 1 from dual where 1 <> null;
no rows selected
You need to display product names from the PRODUCTS table that belong to the 'Software/Other '
category with minimum prices as either $2000 or $4000 and no unit of measure.
You issue the following query:
SQL>SELECT prod_name, prod_category, prod_min_price
FROM products
WHERE prod_category LIKE '%Other%' AND (prod_min_price = 2000 OR
prod_min_price = 4000) AND prod_unit_of_measure <> '';
Which statement is true regarding the above query?
A.It executes successfully but returns no result.
B.It executes successfully and returns the required result.
C.It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is not valid.
D.It generates an error because the condition specified for the PROD_CATEGORY column is not valid.
答案:A
解析:''相当于null,null不能通过= <>来判断,只能通过 is来判断,因此prod_unit_of_measure <> ''始终为false
SQL> set feedback on
SQL> select 1 from dual where 1 <> '';
no rows selected
SQL> select 1 from dual where 1 <> null;
no rows selected
0 0
- 59.View the Exhibit and examine the data in the PRODUCTS table.
- 85.View the Exhibit and examine the structure and data in the INVOICE table.
- 107.View the Exhibit and examine the structure and data in the INVOICE table.
- 15.View the Exhibit and examine the data in the CUSTOMERS table.
- 17.View the Exhibit and examine the data in the EMPLOYEES table.
- 53.View the Exhibit and examine the data in the PROMOTIONS table.
- 66.View the Exhibit and examine the data in the COSTS table.
- 126.View the Exhibit and examine the data in the PROJ_TASK_DETAILS table.
- 130.View the Exhibit and examine the data in the EMPLOYEES table:
- 150.View the Exhibit and examine the data in the PROMOTIONS table.
- 169.View the Exhibit and examine the description for the PRODUCTS and SALES table.
- 11.View the Exhibit and examine the structure of the PRODUCTS table.
- 13.View the Exhibit and examine the structure of the PRODUCTS table.
- 52.View the Exhibit and examine the structure of the PRODUCTS table.
- 63.View the Exhibit and examine the structure of the PRODUCTS table.
- 136.View the Exhibit and examine the structure of the PRODUCTS table.
- 142.View the Exhibit and examine the structure of the PRODUCTS table.
- 144.View the Exhibit and examine the structure of the PRODUCTS table.
- 11.2 Job Seperation causes WARNINGS and ORA-15025 ORA-27041 With Certain Users (文档 ID 1317692.1)
- 对jsp九大内置对象的理解
- RTMP直播点播-基于开源crtmpserver
- Android 线程本地变量<一> ThreadLocal源码解析
- Android 深入理解Android中的自定义属性
- 59.View the Exhibit and examine the data in the PRODUCTS table.
- NEUOJ 1681
- win10 Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host
- 二级指针和二维数组详解
- 图片 音频等文件转成base64编码
- HTML5新特性
- SVM入门(八)松弛变量
- 初次使用git管理代码~后续使用过程中遇到的问题汇总
- PAT 1101. Quick Sort (25)