how to display only 4 records from a table based on a
condition
for ex
i have a table called products
in that nid,prodname are fields
i want to display only any 4 records of perticular product
plz tell me

Answer Posted / roger

LIMIT 0,4 will return 5 records because it starts with 0.
It should be LIMIT 0,3

SELECT prodid, prodname FROM products limit 0,3

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I create a database in mysql?

473


What is a join? Explain the different types of mysql joins.

702


What is mysql optimization?

489


What does do in mysql?

484


How do you kill a long running query in mysql?

470






How would concatenate strings in mysql?

535


What is append query?

519


How do I quit mysql?

494


How to enable or disable a row of a table using MySQL in struts?

3578


What is mysql root?

495


If you are assigned a task, to find the information of procedures. What are the basic commands that you will use to do so?

511


How do I rename a table in mysql workbench?

503


What is the maximum connection pool size?

519


Can you tell which of the following where clauses is faster?

453


How to determine the location of the data directory?

506