95.The PRODUCTS table has the following structure:
来源:互联网 发布:ps淘宝字体百度云 编辑:程序博客网 时间:2024/04/29 22:25
95.The PRODUCTS table has the following structure:
name Null Type
PROD_ID NOT NULL NUMBER(4)
PROD_NAME VARCHAR2(25)
PROD_EXPIRY_DATE DATE
Evaluate the following two SQL statements:
SQL>SELECT prod_id, NVL2(prod_expiry_date, prod_expiry_date + 15,'') FROM products;
SQL>SELECT prod_id, NVL(prod_expiry_date, prod_expiry_date + 15) FROM products;
Which statement is true regarding the outcome?
A.Both the statements execute and give different results.
B.Both the statements execute and give the same result.
C.Only the first SQL statement executes successfully.
D.Only the second SQL statement executes successfully.
答案:A
解析:
nvl2(expr1,expr2,expr3):expr1为null,返回expr3,否则返回expr2
nvl(expr1,expr2):expr1为null,返回expr2
name Null Type
PROD_ID NOT NULL NUMBER(4)
PROD_NAME VARCHAR2(25)
PROD_EXPIRY_DATE DATE
Evaluate the following two SQL statements:
SQL>SELECT prod_id, NVL2(prod_expiry_date, prod_expiry_date + 15,'') FROM products;
SQL>SELECT prod_id, NVL(prod_expiry_date, prod_expiry_date + 15) FROM products;
Which statement is true regarding the outcome?
A.Both the statements execute and give different results.
B.Both the statements execute and give the same result.
C.Only the first SQL statement executes successfully.
D.Only the second SQL statement executes successfully.
答案:A
解析:
nvl2(expr1,expr2,expr3):expr1为null,返回expr3,否则返回expr2
nvl(expr1,expr2):expr1为null,返回expr2
0 0
- 95.The PRODUCTS table has the following structure:
- 57.The CUSTOMERS table has the following structure:
- 75.The following data exists in the PRODUCTS table:
- 140.Examine the structure of the PRODUCTS table:
- 165.You have an ORDERS table with the following structure:
- 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.
- 37.You issued the following command to drop the PRODUCTS table:
- 1Z0-051 37. You issued the following command to drop the PRODUCTS table:
- Mysql Native table 'performance_schema'.'session_variables' has the wrong structure
- PostgreSQL View the table structure
- User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or a
- 185.User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK,
- 从0开始学习SpringBoot-第1天
- monke项目使用步骤
- HDU 2550 百步穿杨 (水题)
- spring + hibernate 实现 webService
- Leetcode217. Contains Duplicate
- 95.The PRODUCTS table has the following structure:
- python数据结构
- linux下使用yum安装jdk、mysql、tomcat、httpd
- mysql 通过federated引擎 跨服务器访问数据
- 26-题目1153:括号匹配问题
- 2015.10华为软件工程师校招面经
- C#中读取SQLServer数据库方法类库(感觉有点意思就载下来了 )
- qt里产生随机数
- [iOS]关于从相册选取的图片方向问题的处理