Premium

Oracle Advanced SQL and PL/SQL Developer Certification Questions and Answers (Dumps and Practice Questions)



Question : What value is returned after executing the following statement?
TO_CHAR(1210.73, '$9,999.00')

  :  What value is returned after executing the following statement?
1. $1,210
2. $1,210.73
3. $1,210.7
4. $1210.73


Correct Answer : Get Lastest Questions and Answer :

Explanation: The syntax for the Oracle/PLSQL TO_CHAR function is:

TO_CHAR( value, [ format_mask ], [ nls_language ] )
Parameters or Arguments

value can either be a number or date that will be converted to a string.

format_mask is optional. This is the format that will be used to convert value to a string.

nls_language is optional. This is the nls language used to convert value to a string.






Question : What value is returned after executing the following statement?
TO_CHAR(21, '000099')

  :  What value is returned after executing the following statement?
1. 21
2. 000021
3. 000099
4. 210000


Correct Answer : Get Lastest Questions and Answer :

Explanation: The syntax for the Oracle/PLSQL TO_CHAR function is:

TO_CHAR( value, [ format_mask ], [ nls_language ] )
Parameters or Arguments

value can either be a number or date that will be converted to a string.

format_mask is optional. This is the format that will be used to convert value to a string.

nls_language is optional. This is the nls language used to convert value to a string.
Let's look at some Oracle TO_CHAR function examples and explore how to use the TO_CHAR function in Oracle/PLSQL. with Numbers
For example: The following are number examples for the TO_CHAR function.
TO_CHAR(1210.73, '9999.9')
Result: ' 1210.7'
TO_CHAR(-1210.73, '9999.9')
Result: '-1210.7'
TO_CHAR(1210.73, '9,999.99')
Result: ' 1,210.73'
TO_CHAR(1210.73, '$9,999.00')
Result: ' $1,210.73'
TO_CHAR(21, '000099')
Result: ' 000021'





Question : What value is returned after executing the following statement?
TO_NUMBER('1210.73', '9999.99')


  :  What value is returned after executing the following statement?
1. 1210.9
2. 1210.7
3. 1210.73
4. 1210


Correct Answer : Get Lastest Questions and Answer :

Explanation: The syntax for the Oracle/PLSQL TO_NUMBER function is:

TO_NUMBER( string1, [ format_mask ], [ nls_language ] )
Parameters or Arguments

string1 is the string that will be converted to a number.

format_mask is optional. This is the format that will be used to convert string1 to a number.

nls_language is optional. This is the nls language used to convert string1 to a number.
Let's look at some Oracle TO_NUMBER function examples and explore how to use the TO_NUMBER function in Oracle/PLSQL.

For example:
TO_NUMBER('1210.73', '9999.99')
Result: 1210.73
TO_NUMBER('546', '999')
Result: 546
TO_NUMBER('23', '99')
Result: 23
Since the format_mask and nls_language parameters are optional, you can simply convert a text string to a numeric value as follows:
TO_NUMBER('1210.73')
Result: 1210.73



Related Questions


Question : In a Oracle there is data type of NUMBER(,). Which value will not be permitted in this column?
  : In a Oracle there is data type of NUMBER(,). Which value will not be permitted in this column?
1. 99999999
2. 999999.99
3. Access Mostly Uused Products by 50000+ Subscribers
4. 999999
5. 99.99



Question : When you do the SQL operation as below

DATE1-DATE2
Where both DATE1 and DATE2 are having datatype as DATE. Select the correct statement from below.
 : When you do the SQL operation as below
1. It will return number of days between two dates, with data type as a Number
2. Returned number of days with Datatype as DATE
3. Access Mostly Uused Products by 50000+ Subscribers
4. Returned number of days with Datatype as VARCHAR2



Question :Which statement is correct for column having data type VARCHAR()
  :Which statement is correct for column having data type VARCHAR()
1. The VARCHAR2 data type is replaced by the CHAR data type.
2. This column must store character data that is at least 50 characters long.
3. Access Mostly Uused Products by 50000+ Subscribers
4. None of the above



Question : Which expressions do not return NULL values?
A. select ((99 + 44) * 5) + null from dual;
B. select 'HadoopExam '||null||'QuickTechie.com' from dual;
C. select null/0 from dual;
D. select null||'HadoopExam'||null as "QuickTechie.com" from dual;

  :  Which expressions do not return NULL values?
1. A,C
2. B,D
3. Access Mostly Uused Products by 50000+ Subscribers
4. A,B
5. B,C




Question : Which of the following will return all the columns from a table
 : Which of the following will return all the columns from a table
1. select all from table;
2. select % from table;
3. Access Mostly Uused Products by 50000+ Subscribers
4. select *.* from table;




Question : There are rows of data in the Total table. Consider the following SQL statement: SELECT ' * ' "Score" FROM total;
Select correct statement
  : There are  rows of data in the Total table. Consider the following SQL statement: SELECT ' * '
1. 1 row returned, Score column contains value 12
2. 100 rows returned, Score column contains value 12 for all 100 rows
3. Access Mostly Uused Products by 50000+ Subscribers
4. 100 rows returned, Score column contains value 4*3 for all 100 rows
5. Error