Basic maths - operator precedence

  • Comments posted to this topic are about the item Basic maths - operator precedence

  • nice question.

    Thanks&Regards
    AJAY REDDY.L

  • Not much different from this one

    http://www.sqlservercentral.com/questions/Precedence/95143/

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Nice one...

  • easy basic question 🙂

    +1

    But still 23% answer are incorrect ;-):w00t:

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • Easy question for the day! Thanks..

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Back to basics question.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Nice question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • hi, Morning start with basic question.... thanks...

    --Manik

    Go fast as possible

    Manik
    You cannot get to the top by sitting on your bottom.

  • I got it wrong!

    I'd applied BODMAS to the 4 statements so I figured it was a different answer. Thought my reasoning was sound, so I checked the link and found:

    When two operators in an expression have the same operator precedence level, they are evaluated left to right based on their position in the expression.

    You learn something new every day.

  • Nice & easy one.

    But you steal some of my time by making me to sit and calculate each and every statement..:-) .

    --
    Dineshbabu
    Desire to learn new things..

  • bitbucket-25253 (2/5/2013)


    Not much different from this one

    http://www.sqlservercentral.com/questions/Precedence/95143/

    Previous one was quite simple expression. This one with some complex expression..

    We can consider this as series of question..:-)

    --
    Dineshbabu
    Desire to learn new things..

  • Dineshbabu (2/6/2013)


    But you steal some of my time by making me to sit and calculate each and every statement..:-) .

    You could have saved that time. I just checked for which statements the parentheses matched the order SQL Server would use without parentheses and for which statement a different order was forced. Only one forced a different order, so that had to be the correct answer.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Hugo Kornelis (2/6/2013)


    Dineshbabu (2/6/2013)


    But you steal some of my time by making me to sit and calculate each and every statement..:-) .

    You could have saved that time. I just checked for which statements the parentheses matched the order SQL Server would use without parentheses and for which statement a different order was forced. Only one forced a different order, so that had to be the correct answer.

    +1

    Same numbers and operators, only parenthesis change position. This is a pure mathematical question! No calculation required.

  • Good reminder of basic maths.

    Thanks for the question

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

Viewing 15 posts - 1 through 15 (of 59 total)

You must be logged in to reply to this topic. Login to reply