IBM(000-730)

单选题How should the following UDF be invoked in order to convert US currency values stored in the EXPENSES table into Canadian currency?CREATE FUNCTION getratews11 ( country1 VARCHAR(100), country2 VARCHAR(100) ) RETURNS DOUBLE LANGUAGE SQL CONTAINS SQL EXT

题目
单选题
How should the following UDF be invoked in order to convert US currency values stored in the EXPENSES table into Canadian currency?CREATE FUNCTION getratews11 ( country1 VARCHAR(100), country2 VARCHAR(100) ) RETURNS DOUBLE LANGUAGE SQL CONTAINS SQL EXTERNAL ACTION NOT DETERMINISTIC BEGIN ... END()
A

CALL getratews11('USA','CANADA')

B

CALL expenses.getratews11('USA','CANADA')

C

SELECT getratews11('USA','CANADA') FROM expenses

D

SELECT * FROM TABLE(getratews11('USA','CANADA')) AS convert_currency

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

SQL server中()语句能将temp表中的hostname字段扩充为varchar(100)。

  • A、alter table temp alter column hostname varchar(1100)
  • B、alter table temp column hostname varchar(100)
  • C、alter table temp alter column of hostname varchar(100)
  • D、alter table temp add column hostname varchar(100)

正确答案:A

第2题:

Application developers in TestKing.com create an assembly that contains a CLR function.This CLR function reads data from a spreadsheet, performs some calculations, and returns the data to a SQL Server 2005 computer. You need to register the assembly with SQL Server 2005 by using the CREATE ASSEMBLY statement and the least privileged security permission set. Which permission set should you use?()

  • A、Default
  • B、SAFE
  • C、EXTERNAL ACCESS
  • D、UNSAFE

正确答案:C

第3题:

Given the following function:CREATE FUNCTION emplist () RETURNS TABLE ( id CHAR(6) , firstname VARCHAR(12) , lastname VARCHAR(15) ) LANGUAGE SQL BEGIN ATOMIC RETURN SELECT EMPNO, FIRSTNME, LASTNAME FROM EMPLOYEE WHERE WORKDEPT IN (‘A00‘, ‘B00‘); ENDHow can this function be used in an SQL statement?

A.SELECT TABLE(EMPLIST()) FROM EMPLOYEE

B.SELECT TABLE(EMPLIST()) AS t FROM EMPLOYEE

C.SELECT EMPLIST(id, firstname, lastname) FROM EMPLOYEE

D.SELECT id, firstname, lastname FROM TABLE(EMPLIST()) AS t


参考答案:D

第4题:

You executed the following code:   SQL> CERATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   Which types of tables will be created automatically?()

  • A、 journal table
  • B、 clustered table
  • C、 mapping table
  • D、 partitioned table

正确答案:C

第5题:

How should the following UDF be invoked in order to convert US currency values stored in the EXPENSES table into Canadian currency?CREATE FUNCTION getratews11 ( country1 VARCHAR(100), country2 VARCHAR(100) ) RETURNS DOUBLE LANGUAGE SQL CONTAINS SQL EXTERNAL ACTION NOT DETERMINISTIC BEGIN ... END()

  • A、CALL getratews11('USA','CANADA')
  • B、CALL expenses.getratews11('USA','CANADA')
  • C、SELECT getratews11('USA','CANADA') FROM expenses
  • D、SELECT * FROM TABLE(getratews11('USA','CANADA')) AS convert_currency

正确答案:C

第6题:

You executed the following code:   SQL> CREATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   In which tablespace will the mapping table be created?()

  • A、 SYSTEM tablespace
  • B、 SYSAUX tablespace
  • C、 Undo tablespace
  • D、 The tablespace of the Index Organized Table (IOT)

正确答案:D

第7题:

Given the following function: CREATE FUNCTION emplist ( ) RETURNS TABLE ( id CHAR(6) , firstname VARCHAR(12) , lastname VARCHAR(15) ) LANGUAGE SQL BEGIN ATOMIC RETURN SELECT EMPNO, FIRSTNME, LASTNAME FROM EMPLOYEE WHERE WORKDEPT IN ('A00', 'B00'); END How can this function be used in an SQL statement?

  • A、SELECT TABLE(EMPLIST()) FROM EMPLOYEE
  • B、SELECT TABLE(EMPLIST()) AS t FROM EMPLOYEE
  • C、SELECT EMPLIST(id, firstname, lastname) FROM EMPLOYEE
  • D、SELECT id, firstname, lastname FROM TABLE(EMPLIST()) AS t

正确答案:D

第8题:

Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()

A.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

B.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))

C.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

D.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))


参考答案:D

第9题:

Evaluate the set of SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?()

  • A、The DESCRIBE DEPT statement displays the structure of the DEPT table.
  • B、The ROLLBACK statement frees the storage space occupied by the DEPT table.
  • C、The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist.
  • D、The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.

正确答案:A

第10题:

You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()

  • A、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );
  • B、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
  • C、CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
  • D、CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
  • E、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
  • F、CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );

正确答案:E

更多相关问题