单选题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


相似考题
更多“单选题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”相关问题
  • 第1题:

    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

  • 第2题:

    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

  • 第3题:

    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

  • 第4题:

    Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?()

    • A、SELECT*FROMDEPT;
    • B、SELECT*FROMSCOTT.DEPT;
    • C、SELECT*FROMDBASCOTTDEPT;
    • D、SELECT*FROMALL_USERSWHEREUSER_NAME=';SCOTT';ANDTABLENAME=';DEPT';;

    正确答案:B

  • 第5题:

    You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named DB1 in the instance. The DB1 database contains the following stored procedure. (Line numbers are useded for reference only.)  01 CREATE PROCEDURE Sales.Procedure1  02 AS  03 IF OBJECT_ID('Service.Table') IS NOT NULL  04 DROP TABLE Service.Table;  06 CREATE TABLE Service.Table (  07 Id int PRIMARY KEY CLUSTERED,  08 Name varchar(100);  09 );  11 ...  12  GOThe following exception is raised when a user tries to invoke Procedure1, "Msg 262, Level 14, State 1, Procedure Procedure1, Line 5 CREATE TABLE permission denied in database 'DB1'." You should grant the user access to execute Procedure1, you must assign only the required permissions.  What action should you do perform?()  

    • A、Between lines 01 and 02, you should insert the WITH EXECUTE AS 'dbo' clause. 
    • B、Between lines 01 and 02, you should insert the EXECUTE AS USER = 'dbo' statement. 
    • C、You should give the user the ALTER permission on the Service schema 
    • D、You should give the CREATE TABLE permission and permit the user to drop the Service.Table table. 

    正确答案:A

  • 第6题:

    You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named Dworks in the instance. The Dworks database has a table named Orderthings. The Orderthings table is partitioned on the OrderId column. The first partition contains integer values greater than 100,000, while the second partition contains integer values between 1 and 100,000. You have to add a new partition. The new partition should contain integer values greater than 200,000. What should you do? ()

    • A、A new partition function should be created 
    • B、You should change the existing partition scheme 
    • C、You should use a Merge clause to change the existing partition function 
    • D、You should use a Split clause to change the existing partition function 

    正确答案:D

  • 第7题:

    单选题
    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
    解析: 暂无解析

  • 第8题:

    单选题
    You work in a company which is named Wiikigo Corp. The company uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named Dworks in the instance. The Dworks database has a table named Orderthings. The Orderthings table is partitioned on the OrderId column. The first partition contains integer values greater than 100,000, while the second partition contains integer values between 1 and 100,000. You have to add a new partition. The new partition should contain integer values greater than 200,000. What should you do? ()
    A

    A new partition function should be created 

    B

    You should change the existing partition scheme 

    C

    You should use a Merge clause to change the existing partition function 

    D

    You should use a Split clause to change the existing partition function 


    正确答案: B
    解析: 暂无解析

  • 第9题:

    单选题
    Application developers in your company 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
    解析: 暂无解析

  • 第10题:

    单选题
    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.


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    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
    解析: 暂无解析

  • 第12题:

    单选题
    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


    正确答案: D
    解析: 暂无解析

  • 第13题:

    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

  • 第14题:

    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

  • 第15题:

    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

  • 第16题:

     Application developers in your company 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

  • 第17题:

    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

  • 第18题:

    单选题
    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()
    A

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: A
    解析: 暂无解析

  • 第19题:

    单选题
    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
    解析: 暂无解析

  • 第20题:

    单选题
    You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named DB1 in the instance. The DB1 database contains the following stored procedure. (Line numbers are useded for reference only.)  01 CREATE PROCEDURE Sales.Procedure1  02 AS  03 IF OBJECT_ID('Service.Table') IS NOT NULL  04 DROP TABLE Service.Table;  06 CREATE TABLE Service.Table (  07 Id int PRIMARY KEY CLUSTERED,  08 Name varchar(100);  09 );  11 ...  12  GOThe following exception is raised when a user tries to invoke Procedure1, "Msg 262, Level 14, State 1, Procedure Procedure1, Line 5 CREATE TABLE permission denied in database 'DB1'." You should grant the user access to execute Procedure1, you must assign only the required permissions.  What action should you do perform?()
    A

    Between lines 01 and 02, you should insert the WITH EXECUTE AS 'dbo' clause. 

    B

    Between lines 01 and 02, you should insert the EXECUTE AS USER = 'dbo' statement. 

    C

    You should give the user the ALTER permission on the Service schema 

    D

    You should give the CREATE TABLE permission and permit the user to drop the Service.Table table. 


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?()
    A

    SELECT*FROMDEPT;

    B

    SELECT*FROMSCOTT.DEPT;

    C

    SELECT*FROMDBASCOTTDEPT;

    D

    SELECT*FROMALL_USERSWHEREUSER_NAME=';SCOTT';ANDTABLENAME=';DEPT';;


    正确答案: D
    解析: 暂无解析

  • 第22题:

    单选题
    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


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    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


    正确答案: A
    解析: 暂无解析

  • 第24题:

    单选题
    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


    正确答案: B
    解析: 暂无解析