[2025年04月]更新のOracle 1z0-071日本語実際のブレーン知能問題集
合格できる1z0-071日本語試験更新された1z0-071日本語試験問題集PDFを獲得2025年更新
質問 # 151
このステートメントを調べてください。
SELECT 1 AS id、 'John'AS名
デュアルから
連合
SELECT 1、 'ジョン' AS名
デュアルから
1で注文;
実行時に何が返されますか?
- A. エラー
- B. 2行
- C. 1行
- D. 0行
正解:C
解説:
The statement provided uses the UNION operator, which combines the results of two or more queries into a single result set. However, UNION also eliminates duplicate rows. Both queries in the union are selecting the same values 1 and ' John', thus the result is one row because duplicates will be removed.
SELECT 1 AS id, ' John' AS first name FROM DUAL UNION SELECT 1 , ' John' AS name FROM DUAL ORDER BY 1; Given that both SELECT statements are actually identical in the values they produce, despite the differing column aliases, the UNION will eliminate one of the duplicate rows, resulting in a single row being returned.
References:
* Oracle Documentation on UNION: SQL Language Reference - UNION
質問 # 152
展示を表示し、EMPおよびDEPTテーブルのデータを調べます。
DEPTテーブルでは、DEPTNOが主キーです。
EMPテーブルでは、EMPNOはPRIMARY KEYであり、DEPTNOはDEPTテーブルのDEPTNO列を参照するFOREIGN KEYです。
与えられたシーケンスで実行される次のステートメントの結果はどうなるでしょうか?
DROP TABLE emp;
ドロップバック前のフラッシュバックテーブルemp;
emp VALUES(2、 'SCOTT'、10);に挿入します。
emp VALUES(3、 'KING'、55);に挿入します。
- A. テーブルがフラッシュバックされたときにテーブルの制約が自動的に取得されないため、両方のINSERTステートメントが成功します。
- B. 他のテーブルを参照する参照整合性制約を除くすべての制約は、テーブルがフラッシュバックされた後に自動的に取得されるため、SECOND INSERTステートメントのみが成功します。
- C. 表がフラッシュバックされると制約が自動的に取得されるため、両方のINSERTステートメントが失敗します。
- D. テーブルがフラッシュバックされた後、主キー制約を除くすべての制約が自動的に取得されるため、最初のINSERTステートメントのみが成功します。
正解:B
質問 # 153
このSQLステートメントを調べてください。
SELECT cust_id、cus_last_name "姓"
お客様から
WHERE country_id = 10
連合
SELECT cust_id CUST_NO、cust_last_name
お客様から
WHERE country_id = 30
3つのORDERBY句を特定し、そのうちの1つでクエリを正常に完了できます。
- A. CUST_NOによる注文
- B. 「姓」で注文
- C. ORDER BY 2、cust_id
- D. 「CUST_NO」による注文
- E. ORDERBY 2、1
正解:B、E
解説:
In SQL, the ORDER BY clause can refer to columns by their alias defined in the SELECT clause or by their positional number in the SELECT list. It's important to understand that after a UNION, the column names in the ORDER BY clause refer to the first SELECT statement's column names and aliases:
* Option A: ORDER BY 2, 1This is correct because it refers to the second and first columns in the first SELECT clause, which correspond to the aliases "Last Name" and cust_id, respectively.
* Option E: ORDER BY "Last Name"This is correct because "Last Name" is a valid alias defined in the first SELECT clause.
The other options fail for the following reasons:
* Option B: "CUST_NO" is not recognized in the ORDER BY clause because it's not an alias used in the first SELECT statement.
* Option C: Incorrect because 2, cust_id mixes positional reference with a column name that doesn't apply to both SELECT statements consistently.
* Option D: ORDER BY CUST_NO fails because CUST_NO is not an alias in the first SELECT clause.
質問 # 154
CURRENT_TIMEITAMPについて正しい2つのステートメントはどれですか?
- A. 日付はDBTIMEZONEのタイムゾーンにあります。
- B. SESSIONTIMEZONEの設定により値が異なります。
- C. 常にSYSTIMESTAMPと同じ値を返します
- D. CURRENT_DATEと同じ日付を返します。
- E. データ型TIMESTAMPの値を返します
- F. 時刻はDBTIMEZONEのタイムゾーンにあります。
正解:C、F
質問 # 155
CUSTOMERSテーブルのCUSTNAME列のデータを調べます。
CUST_NAME
------------------------------
Renske Ladwig
ジェイソン・マリン
サミュエルマケイン
アランMCEwen
アイリーン・ミッキリネーニ
ジュリア・ネイヤー
姓がMcまたはMCで始まるCUST_NAME値を表示する必要があります。必要な結果を与える2つのWHERE句はどれですか?
- A. WHERE UPPER(SUBSTR(cust_name、INSTR(cust_name、 '')+ 1))LIKE UPPER( 'MC%')
- B. WHERE INITCAP(SUBSTR(cust_name、INSTR(cust_name、 '')+ 1))LIKE'Mc% '
- C. WHERE INITCAP(SUBSTR(cust_name、INSTR(cust_name、 '')+ 1))IN( 'MC%'、 'Mc%)
- D. WHERE SUBSTR(cust_name、INSTR(cust_name、 '')+ 1)LIKE'Mc% '
- E. WHERE SUBSTR(cust_name、INSTR(cust_name、 '')+ 1)LIKE'Mc% 'OR'MC%'
正解:A、B
質問 # 156
これらのステートメントと結果を調べます。
SQL> SELECT COUNT(*)FROM emp
カウント(*)
---------------------
14
sQL> CREATE GLOBAL TEMPORARY TABLE t emp As SELECT * FROM emp;
作成されたテーブル
SQL> INSERT INTo temp SELECT * FROM emp;
14行が作成されました
SQL> COMMIT:
コミット完了*
SQL> INSERT INTo temp SELECT * EROM emp;
14.作成された行
SQL> SELECT COUNT(*)FROM t emp
最後のクエリで取得される行数はいくつですか?
- A. 0
- B. 1
- C. 2
- D. 3
正解:D
解説:
Global temporary tables in Oracle Database are designed to hold temporary data for the duration of a session or a transaction.
Given that the global temporary table is created and then populated twice from the emp table without any mention of data deletion, one would initially think the count would be 28, since 14 rows are inserted twice.
However, if the temporary table was created with the default ON COMMIT DELETE ROWS option, the rows are deleted at the end of the transaction, which is signified by the COMMIT operation.
Thus, after the first COMMIT, the temporary table would be empty. After the second INSERT, another 14 rows would be added. So, the last query would retrieve 14 rows unless a DELETE operation was committed.
質問 # 157
UNIONおよびUNION ALL演算子に関して正しい2つのステートメントはどれですか。 (2つ選択してください。)
- A. 出力はUNION ALL演算子でソートされます
- B. UNION ALL演算子によって重複が自動的に削除されます
- C. 各SELECTステートメントで選択された列の名前は同一である必要があります
- D. 重複チェック中にNULLは無視されません
- E. 各SELECTステートメントで選択される列の数は同じである必要があります
正解:D、E
質問 # 158
次のクエリを評価します。
SQL> SELECT TRUNC(ROUND(156.00、-1)、-1)
デュアルから;
結果はどうなりますか?
- A. 0
- B. 1
- C. 2
- D. 3
- E. 4
正解:B
質問 # 159
展示を表示し、PRODUCT_INFORMATIONテーブルの詳細を確認します。
示す
CATEGORY_ID列の値が12または13で、SUPPLIER_ID列の値が102088であるテーブルからPRODUCT_NAMEを表示する必要があります。
次のSQLステートメントを実行しました。
実行に関して正しい説明はどれですか。
- A. WHERE句全体が括弧で囲まれていないため、実行されません。
- B. 同じ列がAND論理演算子で2回使用されているため、実行されません。
- C. 実行され、目的の結果が返されます。
- D. 実行されますが、行は返されません。
正解:D
質問 # 160
2つ選択してください
PRODUCTDETALSテーブルの説明を調べます。
- A. EXPIRY_DATEは算術式では使用できません。
- B. PRODUCT_NAMEに重複する値を含めることはできません。
- C. 日付が割り当てられていない場合、EXPIRY_DATEにはデフォルトでSYSDATEが含まれます
- D. PRODUCT_PRICEには、値が割り当てられていない場合、デフォルトで値ゼロが含まれます。
- E. PRODUCT_IDにPEIMARYKEY制約を割り当てることができます。
- F. PRODUCT_PRICEは、値が格納されていない場合でも算術式で使用できます
正解:E、F
質問 # 161
正しい2つのステートメントはどれですか?
- A. DECODEを使用して評価されたAIl条件は、CASEを使用して評価することもできます。
- B. CASEもDECODEも関数ではありません。
- C. CASEは関数であり、DECODEは関数ではありません。
- D. CASEを使用して評価されたすべての条件は、DECODEを使用して評価することもできます。
- E. DECODEは関数であり、CASEは関数ではありません。
- F. CASEとDECODEはどちらも関数です。
正解:A、E
解説:
A). True. The DECODE function can evaluate conditions, but it is limited to equality checks. On the other hand, CASE can evaluate these and a broader range of conditions using different comparison operators.
D). True. DECODE is a function in Oracle SQL that allows for simple conditional query transformation.
CASE is not a function but a statement that provides more flexibility and readability when handling conditional logic in SQL queries.
DECODE is more limited compared to CASE since it can't perform logical operations other than equality.
質問 # 162
。データベースでユーザー定義のロックは使用されていません。
トランザクション制御言語(TCL)について正しい3つはどれですか?
- A. COMMITはトランザクションを終了し、すべての変更を永続的にします。
- B. ROLLBACK to SAVEPOTNTは、指定されたセーブポイント以降に行われたトランザクションの変更を元に戻し、トランザクションを終了します。
- C. TO SAVEPOINT句を指定しないROLLBACKは、トランザクションのすべての変更を元に戻しますが、セーブポイントは消去しません。
- D. COMMITは、トランザクションのすべてのセーブポイントを消去し、そのロックを解放します。
- E. TO SAVEPOINT句を指定しないROLLBACKは、トランザクションのすべての変更を元に戻しますが、ロックを解放しません。
- F. TO SAVEPOINT句を指定しないROLLBACKは、トランザクションの変更を元に戻し、ロックを解除して、すべてのセーブポイントを消去します。
正解:A、D、F
質問 # 163
NLS_DATE_PORMATがDD-MON-YYYYSH24:MI:SSに設定されているセッションの日付/時刻関数について正しい2つのステートメントはどれですか。
- A. CURRENT_TIMESTAMPは、CURRENT_DATEと同じ日付を返します。
- B. SYSDATEは、デフォルトの日付形式がDD-MON-RRの場合にのみ式で使用できます。
- C. CURRENT_TIMESTAMPは、SYSDATEと同じ日付と時刻を、機能秒の追加の詳細とともに返します。
- D. SYSDATEおよびCURRENT_DATEは、データベースサーバーのオペレーティングシステムに設定されている現在の日付と時刻を返します。
- E. CURRENT_DATEは、セッションのタイムゾーンに従って現在の日付と時刻を返します
- F. SYSDATEは、DUALテーブルからのみ照会できます。
正解:D、E
解説:
In Oracle Database 12c SQL, regarding date/time functions and considering a session where NLS_DATE_FORMAT is set to DD-MON-YYYY SH24:MI:SS:
* C. CURRENT_DATE returns the current date and time as per the session time zone. This is correct as CURRENT_DATE returns the current date and time in the time zone of the current SQL session, as set by the ALTER SESSION command.
* D. SYSDATE and CURRENT_DATE return the current date and time set for the operating system of the database server. This is partially correct. SYSDATE returns the current date and time from the operating system of the database server. However, CURRENT_DATE returns the date and time set for the client's operating system environment, adjusted to the session time zone.
Options A, B, E, and F are incorrect based on Oracle's documentation:
* A is incorrect because SYSDATE is independent of the NLS_DATE_FORMAT setting.
* B is incorrect because CURRENT_TIMESTAMP includes time zone information, which can differ from CURRENT_DATE.
* E is incorrect because CURRENT_TIMESTAMP differs from SYSDATE by including fractional seconds and time zone.
* F is incorrect as SYSDATE can be queried in any SELECT statement, not just from DUAL.
質問 # 164
EMPLOYEESテーブルの説明を調べます。
NLS_DATEの形式はDD-MON-RRです。
どの2つのクエリが正常に実行されますか?
- A. SELECT dept_ id、AVG(MAX(salary))FROM employees GROUP By dept_id HAVINGhire_date> 'O1-JAN-19';
- B. SELECT dept_ id、AVG(MAX(salary))FROM employees GROUP BY dept_id、salary;
- C. SELECT dept id、MAX(SUM(salary))FROM employees GROUP BY dept_id;
- D. SELECT AVG(MAX(salary))FROM employees GROUP BY salary;
- E. SELECT dept_ iD、sum(salary)FROM employees WHEREhire_date> '01 -JAN-9'GROUP BY dept_id;
正解:D、E
質問 # 165
round、truncate、mod関数について正しいのはどれですか>?
- A. ROUND(MOD(25,3)、-1)とTRUNC(MOD(25,3)、-1)は両方とも有効であり、異なる結果をもたらします。
- B. ROUND(MOD(25,3)、-1)とTRUNC(MOD(25,3)、-1)は両方とも有効であり、同じ結果が得られます。
- C. ROUND(MOD(25,3)、-1)は無効です
- D. TRUNC(MOD(25,3)、-1)は無効です。
正解:A
解説:
Both ROUND and TRUNC functions can be applied to numbers, and MOD is a function that returns the remainder of a division. The ROUND function rounds a number to a specified number of decimal places, which can be positive, zero, or negative. The TRUNC function truncates a number to a specified number of decimal places.
ROUND(MOD(25,3),-1) rounds the result of MOD(25,3), which is 1, to tens place, which results in 0.
TRUNC(MOD(25,3),-1) truncates the result of MOD(25,3), which is 1, to tens place, which also results in 0.
Both are valid, but in this specific case, they give the same result because the remainder (1) when rounded or truncated to tens place (-1) will be 0.
質問 # 166
どのステートメントが正常に実行されますか?
- A. SELECT *
従業員からe
部門に参加するd
オンd.departments_id = 90
WHERE e.department_id = d.department_id; - B. SELECT *
従業員からe
部門に参加するd
ON e.department_id = d.department_id
WHERE d.department_id = 90; - C. SELECT *
従業員からe
部門dに参加する
WHERE e.department_id = d.department_id
AND d.department_id = 90; - D. SELECT *
従業員からe
部門に参加するd
ON e.department_id = d.department_id
AND d.department_id = 90;
正解:A
質問 # 167
......
更新された1z0-071日本語パスして合格保証試験問題集正確で更新された問題:https://jp.fast2test.com/1z1-071-JPN-premium-file.html