Results 1 to 3 of 3

Thread: using (top) along with select stmt is possible in MySQL???

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Answers
    6

    using (top) along with select stmt is possible in MySQL???

    Is it possible to use this query
    select top 5 * from tablename;
    to get the top 5 rows frm a table in MySQL???Actuallt in SQL i tired it n itz wrking...But itz giving error in MySQL..


  2. #2
    Junior Member
    Join Date
    Nov 2006
    Answers
    25

    Lightbulb Re: using (top) along with select stmt is possible in MySQL???

    In MySql if u want the first n rows then try this one

    select * from table_name limit 0,n;

    I haven't tried it. Hope this will work.


  3. #3
    Junior Member
    Join Date
    Aug 2007
    Answers
    6

    Re: using (top) along with select stmt is possible in MySQL???

    Thanks...I tried it with the query which u gave...And itz working..
    Thank u so much...

    ********************************
    In MySql if u want the first n rows then try this one

    select * from table_name limit 0,n;

    I haven't tried it. Hope this will work.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact