nerdexam
Oracle

1Z0-061 · Question #186

The following data exists in the PRODUCTS table: PROD_ID PROD_LIST_PRICE ---------------------------------------------- 123456 152525.99 You issue the following query: SQL> SELECT RPAD((…

The correct answer is A. 152526****. The LPAD(string, length after padding, padding string) and RPAD(string, length after padding, padding string) functions add a padding string of characters to the left or right of a string until it reaches the specified length after padding.

Using Single-Row Functions to Customize Output

Question

The following data exists in the PRODUCTS table:

PROD_ID PROD_LIST_PRICE ---------------------------------------------- 123456 152525.99 You issue the following query:

SQL> SELECT RPAD(( ROUND(prod_list_price)), 10, '*') FROM products WHERE prod_id = 123456; What would be the outcome?

Options

  • A152526****
  • B**152525.99
  • C152525**
  • Dan error message

How the community answered

(27 responses)
  • A
    81% (22)
  • B
    4% (1)
  • C
    11% (3)
  • D
    4% (1)

Explanation

The LPAD(string, length after padding, padding string) and RPAD(string, length after padding, padding string) functions add a padding string of characters to the left or right of a string until it reaches the specified length after padding.

Topics

#RPAD#ROUND#numeric functions#string functions

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice