B and F are correct answers.
F is correct :
SQL> SELECT level, sysdate
2 FROM dual
3 CONNECT BY
4 level <= 4;
LEVEL SYSDATE
---------- ---------
1 06-AUG-20
2 06-AUG-20
3 06-AUG-20
4 06-AUG-20
It can return multple rows and columns.
D is wrong, you just create a brand new user and do not grant any privilege but still it can select dual table.
F is incorrect because Dual has only one column. Here in your example what you are doing is a projection of multiple column through select statement which can be done in any table even though the table has limited number of columns.
A - false; DUAL is a table automatically created by Oracle Database along with the data dictionary. DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users. Source: Oracle documentation - Oracle Database, Release 19, SQL Language Reference, 9 SQL Queries and Subqueries, Selecting from the DUAL Table
B - true; single column DUMMY with datatype VARCHAR2(1) and value 'X'
C - false; query SELECT sysdate, sysdate FROM dual;
D - false; Alternatively, you can select a constant, pseudocolumn, or expression from any table, but the value will be returned as many times as there are rows in the table. Source: same as mentioned in answer A
E - false; GRANT SELECT any table is not necessary to query DUAL table. Newly created user is not granted with any SELECT privilege, however he/she can query any own object and table DUAL.
F - true; example SELECT with multiple row and column output is SELECT sysdate,sysdate+1 FROM dual CONNECT BY LEVEL <= 5;
DUAL is a table automatically created by Oracle Database along with the data dictionary.
DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value X.
Selecting from the DUAL table is useful for computing a constant expression with the SELECT statement. Because DUAL has only one row, the constant is returned only once.
Alternatively, you can select a constant, pseudocolumn, or expression from any table, but the value will be returned as many times as there are rows in the table.
A. It can be accessed only by the SYS user --> False, anybody can select from dual.
B. It consists of a single row and single column of VARCHAR2 data type. --> True
C. It can display multiple rows but only a single column. --> False, only 1 single row and column (by default: select * from dual)
D. It can be used to display only constants or pseudo columns. --> False, Expression too.
E. It can be accessed by any user who has the SELECT privilege in any schema. --> True
F. It can display multiple rows and columns. False, 1 row/column only.
I correct myself B and F are correct because when you give the create session to any user, he is capable to select the dual table without give that exactly permission.
B and E are 100% correct.
"DUAL is a table automatically created by Oracle Database along with the data dictionary. DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value X."
https://docs.oracle.com/database/121/SQLRF/queries009.htm#SQLRF20036
B and E are 100% correct.
"DUAL is a table automatically created by Oracle Database along with the data dictionary. DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value X."
https://docs.oracle.com/database/121/SQLRF/queries009.htm#SQLRF20036
B is correct as you guys explained here. And the other one should be E.
E. It can be accessed by any user who has the select privilege in any schema.
Any schema owner can select data from its own tables. so that argument is valid here.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Sharif1
Highly Voted 3 years, 11 months agoSimoneF
3 years, 6 months agoAnimeshOracle
2 years, 2 months agoAnimeshOracle
2 years, 2 months agodanito
Highly Voted 4 years, 1 month agoama
4 years agoama
4 years agoTrowa
3 years, 11 months agoNiciMilo
3 years, 11 months agoama
3 years, 11 months agokuvinod29
Most Recent 3 months, 3 weeks agonautil2
8 months, 3 weeks agoismoil
8 months, 3 weeks agoismoil
8 months, 3 weeks agoOracle2020
11 months agozouve
11 months, 1 week agozouve
10 months, 3 weeks agoauwia
1 year agofthusa
1 year, 1 month agoEmperor11
1 year, 4 months agoEmperor11
1 year, 4 months agoEmperor11
1 year, 4 months agochenwen
2 years, 2 months agocasfdsaf
2 years, 4 months agoyarsalan
2 years, 5 months agoryuah
2 years, 6 months agodummydba
3 years, 1 month ago