I need to know why this code is not working

  • I want to search "law" from three tables tbl_books, tbl_books_author and tbl_books_subject. I am running following query.

    SELECT *

    FROM tbl_books p, tbl_books_author d, tbl_books_subject m

    WHERE p.title = 'law'

    OR d.author = 'law'

    OR m.subject = 'law'

    LIMIT 0,30;

    When i run this query it shows on top "Showing rows 0 - 29 (1759260 total, Query took 5.1206 sec)". can you please explain why it is showing this. What is the reason for this.

  • That's not a SQL Server query. Looks more like MySQL (the limit). You'll probably get better answers on a MySQL forum as this one is dedicated to Microsoft SQL Server.

    Try http://forums.mysql.com/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (5/15/2015)


    That's not a SQL Server query. Looks more like MySQL (the limit). You'll probably get better answers on a MySQL forum as this one is dedicated to Microsoft SQL Server.

    Try http://forums.mysql.com/

    Indeed,doesn't look like T-SQL (the sql dialect used by sql server series)

    Off course did you build this query yourself or did you get it from someone else (I had a similar scenario last week when somebody from business had used Microsoft Access to create the sql I needed to execute)

Viewing 3 posts - 1 through 2 (of 2 total)

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