Question discussion

What is the output of the following SQL statement?SELECT SUBSTR('DATABASE', 3, 4);

2373Medium DSSSB TGT Computer Science 0 replies 1 views
0

What is the output of the following SQL statement?

SELECT SUBSTR('DATABASE', 3, 4);
  • ATABA
  • BATAB
  • CTABAS
  • DABAS
Correct answer: A

Explanation

SUBSTR(string, start, length) starts at position 3 (the letter T) and takes 4 characters, giving TABA.

Discussion 0

Nobody has replied yet. Start the discussion!