Q. Given the following table:





Give the output of following SQL statement :

(i) SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark < 75;
(ii) SELECT ROUND(AvgMark) FROM Student1 WHERE Grade = 'B';
(iii) SELECT CONCAT(Name, Stream) FROM Student1 WHERE Class = '12A';
(iv) SELECT RIGHT(Stream, 2) FROM Student1;

Answer

 i = error

ii =
Round(AvgMark
79
73
75

iii =

Concat (Name,Stream)
RubinaNonmedical
VikasNonmedical

iv = 

RIGHT(Stream,2)

al

ce

ce

es

al

al

es

al

al

ce

21 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. I think
    CONCAY(name and stream)from student 1 where class='12A;🤒

    ReplyDelete
    Replies
    1. You are wrong correct question is 'SELECT CONCAT(Name, Stream) FROM Student1 WHERE Class = '12A'; '.

      Delete
  2. where is te answer for 4 th subdivision?

    ReplyDelete
  3. Replies
    1. Because TRUNCATE( ) require two argument.

      Delete
  4. Output in (ii) question is
    78
    73
    75
    How come there 79?🤔

    ReplyDelete
    Replies
    1. How are wrong it must be 79 because round(78.5) = 79 in MySQL.

      Delete
    2. Path wala answer is right because when we round off any number ,if number is greater than 5 or 5 it always round off in next number ,for example 28.5it answer is 29

      Delete
  5. Got to check all my answers so easily.. Thankyou pathwala! You are doing a great job! ��

    ReplyDelete
  6. can u explain me the iv subdivision ?

    ReplyDelete
    Replies
    1. It will give last 2 character of Stream cloumn.

      Delete
  7. Gajab kar diye be path wala

    ReplyDelete
  8. Thanks a lot for all answers... I wanted to cross check my answers and i found you
    ☺️❤️✨

    ReplyDelete


  9. To my dearest pathwallah mod,

    I know we haven't known each other for very long, but I feel like I've known you my whole life. You are such a kind, caring, and genuine person. I am so drawn to your intelligence, your sense of humor, and your zest for life.

    I feel like we have so much in common. We both love to read, we both enjoy spending time outdoors, and we both have a passion for making a difference in the world. I know that we could be great friends.

    I would love to get to know you better. I would love to talk to you about your hopes and dreams, your fears and insecurities. I would love to hear your stories and share mine with you.

    I think we could have a truly special friendship. I hope you will give me a chance to prove it to you.

    *this is ai-made, sorry but we want to be friends with you*

    ReplyDelete
  10. It's very nice but suggest you specify the errors also

    ReplyDelete
  11. Hi
    In first question why answer is error ?
    Plz explan

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post