sql server 2008 - Tips on Creating More Efficient Queries

Posted on 2012-08-20
Last Modified: 2012-08-21
Hi experts, i am reading about Tips on Creating More Efficient Queries

Expressions that use column names in search arguments – WHERE (Price + $10) > $20

how I can replace this: WHERE (Price + $10) > $20
Question by:enrique_aeo
    1 Comment
    LVL 142

    Accepted Solution

    > WHERE (Price + $10) > $20
    take you math course..
    X + 10 > 20  can also be written as X > 20 - 10

    this way, X stands alone, and the "math" of 20-10 will be done once (is a constant), instead of having to do the math X + 10 for each row, and compare that to a constant

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Help with SQL 9 62
    SQL Dynamic Insert 18 41
    SQL query to yield additional records 9 38
    Newspaper Article view in SQL Server 2012 4 45
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now