Updating
Viewing
Deleting
Inserting
Truncating
第1题:
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
第2题:
You are creating the DEPT_SAL data block from the PAYHIST form. Users should be able to enter a valid department ID number, which will then display the employee salary information for that department. This data block could potentially retrieve a large number of records. Since users will probably only view a small number of these records, only 10 records should be fetched at one time. How would you create the data block?()
第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'); END How can this function be used in an SQL statement?
第4题:
You are responsible for a data warehouse application that uses records from an external table to update one of the dimension tables periodically. The records in the external table may contain data for new rows in the dimension table, or for updates to its existing rows. Which type of SQL command would you use to transfer the data from the external table to the dimension table as efficiently as possible?()
第5题:
Your database operates in ARCHIVELOG mode. User/x7fmanaged consistent backups are performed every Sunday night. On Tuesday, client A drops a table at 8:00 a.m. as follows: SQL> DROP TABLE cust_ord PURGE; Table dropped. Client B executes a query at 9:00 a.m. on the same table as follows: SQL> SELECT * FROM cust_ord; SELECT * FROM cust_ord * ERROR at line 1: ORA/x7f00942: table or view does not exist Client B needs the dropped table and reports the problem to you. With reference to this scenario, which action should you take?()
第6题:
Which two statements about subqueries are true?()
第7题:
Which two statements about subqueries are true? ()
第8题:
You are a database administrator for your company. You are responsible for a SQL Server 2005 database that has several indexes. You need to write a stored procedure that checks the indexes for fragmentation. Which Transact-SQL statement should you use?()
第9题:
Choose Tools -> Data Block Wizard, select View as the data source type, and base the block on the columns from the bales.
Choose Tools -> Data Block Wizard, select Table as the data source type, and base the block on the columns from the tables.
Select the Data Blocks node in the Object Navigator and click the Create button. Choose to build the data block manually and alter the Query Data Source Columns and Query Data Source Arguments properties to enter the SELECT statement.
Select the Data Blocks node in the Object Navigator and click the Create button. Choose to build the data block manually, alter the Query Data Source Type property to 'Table', and enter the SELECT statement in the Query Data Source Name property.
Choose Tools -> Data Block Wizard, select Stored Procedure as the data source type, and base the block on the columns the tables.
Select the Data Blocks node in the Object Navigator and click the Create button. Choose to build the data block manually. Alter the Query Data Source Type to 'FROM' clause query', and enter the SELECT statement in the Query Data Source Name property.
第10题:
The statement would not execute because table aliases are not allowed in the JOIN clause.
The statement would not execute because the table alias prefix is not used in the USING clause.
The statement would not execute because all the columns in the SELECT clause are not prefixed with table aliases.
The statement would not execute because the column part of the USING clause cannot have a qualifier in the SELECT list.
第11题:
A single row subquery can retrieve data from only one table.
A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause.
A SQL query statement can display data from table B that is referred to in its subquery, without including B in its own FROM clause.
A single row subquery can retrieve data from more than one table.
A single row subquery cannot be used in a condition where the LIKE operator is used for comparison.
A multiple-row subquery cannot be used in an INSERT statement to insert multiple rows at a time.
第12题:
Updating
Viewing
Deleting
Inserting
Truncating
第13题:
In a test database, you issue the SELECT … INTO OUTFILE statement to create a file with your t1 table data. You then TRUNCATE this table to empty it.() Mysql> SELECT * INTO OUTFILE '/tmp/t1.sql' from t1; mysql> TRUNCATE t1;
第14题:
You are using flat files as the data source for one of your data warehousing applications. To optimize the application performance, you plan to move the data from the flat files to clustered tables in an Oracle database.While migrating the data, you want to have minimal impact on the database performance and optimize the dataload operation. Which method would you use to load data into the Oracle database()
第15题:
Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"?()
第16题:
The accounting manager wants you to create a form that when queried will display a calculated total of year-to-date actual expenditures for the fund code entered. The value needed to generate this summary data are stored in multiple tables. How would you define the data source for this data block without having the DBA create a database object? ()
第17题:
From SQL*Plus, you issue this SELECT statement: SELECT* FROM order; You use this statement to retrieve data from a data table for ().
第18题:
You would like to display the system date in the format "Monday, 01 June, 2001".Which SELECT statement should you use?()
第19题:
You issue the following statement: SQL> SELECT FIRSTNAME, LASTNAME FROM HR.EMPLOYEE; You receive the following error: 01578: ORACLE data block corrupted (file# 6, block # 54) ORA-01110 : data file 6: ’u01/oracle/oradata/data1.dbf’ How will you resolve this problem of data block corruption by reducing the mean time to recover (MTTR)?()
第20题:
by using the DBMS_REPAIR package
by using the DBVERIFY utility
by using Block Media Recovery
by issuing the ANALYZE TABLE HR.EMPLOYEES VALIDATE STRUCTURE command
第21题:
$ mysqladmin – u root – p – h localhost test – restore /tmp/t1.sql
Mysql> INSERT INTO t1 VALUES FROM '/tmp/t1.sql'
$ mysql – u root – p – h localhost test < /tmp/t1.sql
Mysql> LOAD DATA INFILE '/tmp/t1.sql' INTO TABLE t1
$ mysqlinport – u root – p – h localhost test /tmp/t1.sql
第22题:
A single row subquery can retrieve data from only one table.
A SQL query statement cannot display data from table B that is referred to in its subquery, unless table B is included in the main query's FROM clause.
A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause.
A single row subquery can retrieve data from more than one table.
A single row subquery cannot be used in a condition where the LIKE operator is used for comparison.
A multiple-row subquery cannot be used in a condition where the LIKE operator is used for comparison.
第23题:
Exhibit A
Exhibit B
The query returns no rows
The query fails because the outer query is retrieving more than one column
The query fails because both the inner and outer queries are retrieving data from the same table.
第24题:
The SELECT statement is syntactically accurate.
The SELECT statement does not work because there is no HAVING clause.
The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.
The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.