Hi,
I guess this is for a java.sql.PreparedStatement as the '?'
seem to indicate that.

LIMIT limits ;-) the number of rows retrieved,
i.e. LIMIT 10, 20 gives you 20 rows starting at row 20 in the
resultset and LIMIT 10 gives you the first 10 rows.

See: http://www.mysql.com/doc/en/SELECT.html

/Johan

Caroline Jen wrote:

I saw somebody has MySQL statement this way:

        StringBuffer sql = new StringBuffer(512);
        sql.append("SELECT ThreadID, ForumID,
MemberName, LastPostMemberName, ThreadTopic,
ThreadBody");
        sql.append(" FROM " + TABLE_NAME);
        sql.append(" ORDER BY " + sort + " " + order);
        sql.append(" LIMIT ?, ?");

What is LIMIT? What those question marks stand for?

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/




--
Johan Höök, Pythagoras Engineering Group
                - MailTo:[EMAIL PROTECTED]
                - http://www.pythagoras.se
Pythagoras AB, Stormbyv. 2-4, SE-163 55 SPÅNGA, Sweden
Phone: +46 8 760 00 10 Fax: +46 8 761 22 77



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to