| | |
How to select the Last row from a table..using Mysql
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 2
Reputation:
Solved Threads: 0
Suppose this is a Table
Create Table Person(
PersonID varchar(8),
PersonLN varchar(16),
PersonFN varchar(16),
PersonADD varchar(64),
PersonPH varchar(16));
so there are many enrty in that table.. So how to select the lastest row entry from that table? what will be the Mysql statement?
take PersonID as a Primary key..........
Create Table Person(
PersonID varchar(8),
PersonLN varchar(16),
PersonFN varchar(16),
PersonADD varchar(64),
PersonPH varchar(16));
so there are many enrty in that table.. So how to select the lastest row entry from that table? what will be the Mysql statement?
take PersonID as a Primary key..........
MySQL Syntax (Toggle Plain Text)
SELECT * FROM Person ORDER BY PersonID DESC LIMIT 1
Last edited by stymiee; Jul 26th, 2006 at 11:10 am.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Nov 2006
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
Suppose this is a Table
Create Table Person(
PersonID varchar(8),
PersonLN varchar(16),
PersonFN varchar(16),
PersonADD varchar(64),
PersonPH varchar(16));
so there are many enrty in that table.. So how to select the lastest row entry from that table? what will be the Mysql statement?
take PersonID as a Primary key..........
![]() |
Similar Threads
- Apache (Linux Servers and Apache)
- How to change the color of selected row of an HTML table without using CSS or Javascr (VB.NET)
- php table help (PHP)
- mysql errors, from submit.php and index.php (PHP)
- How can I create database/table images in MySQL (PHP)
- can i select the 2nd row/record from a table (MySQL)
- Print 5 records per table row (see script) (Perl)
- Find and Replace (Database Design)
Other Threads in the MySQL Forum
- Previous Thread: .sql file loses characters
- Next Thread: creating files with 'outfile'??
| Thread Tools | Search this Thread |
amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright count court crm data database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier journalism keyword keywords kickfire laptop law legal license licensing linux managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb single sourcecode spotify sql sugarcrm syntax table techsupport thunderbird transparency virtualization






