This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes  To extract column elements from a particular position onwards Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark " To extract column elements from a particular position onwards "MYSQL"" Watch " To extract column elements from a particular position onwards "MYSQL"" New topic
Author

To extract column elements from a particular position onwards "MYSQL"

sandeep ep
Greenhorn

Joined: Oct 08, 2006
Posts: 4
Hi to everyone,
I want to extract column elements from a particular position .

like this

MYSQL table:
Sn Balance
12 550
13 450
14 360
15 800
16 456
here i want to have values from 13 onwards.then what shall i do
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You don't say whether the "sn" column is ordered in any way, although it is ordered in your example. And it's impossible to guess whether it might be just from its name.

Assuming that it is ordered:
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
$sql = "select * from table where sn >= 13";

Will get your answer...


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
 
 
subject: To extract column elements from a particular position onwards "MYSQL"
 
Similar Threads
StreamTokenizer problem again...
extract particular elements from arraylist
writing to a file at a particular place
Retrieve binary file from database and send to user via web browser
Retrieve MySQL table column names