Q. Write the output produced by the following SQL commands:
(a) SELECT POW(2,3);
(b) SELECT ROUND(123.2345, 2), ROUND(342.9234, -1);
(c) SELECT LENGTH("Informatics Practices");
(d) SELECT YEAR(“1979/11/26”), MONTH(“1979/11/26”), DAY(“1979/11/26”), MONTHNAME(“1979/11/26”);
(e) SELECT LEFT("INDIA",3), RIGHT("Computer Science",4);
(f) SELECT MID("Informatics", 3, 4), SUBSTR("Practices", 3);
Answer :-
A =
POW(2,3) |
8 |
B=
ROUND(123.2345, 2), |
ROUND(342.9234,-1); |
123.23 |
340 |
C=
LENGTH("Informatics Practices") |
21 |
D=
YEAR(“1979/11/26”) |
MONTH(“1979/11/26”) |
DAY(“1979/11/26”) |
MONTHNAME(“1979/11/26”) |
1979 |
11 |
26 |
November |
E =
LEFT("INDIA",3) |
RIGHT("Computer Science",4) |
IND |
ence |
F =
MID("Informatics",3,4) |
SUBSTR("Practices",3) |
form |
actices |
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )