0
how to get a row data with row number in a table of database with java?
int x = Jtable.getSelectedRow() - 1; resultSet = statement.executeQuery("SELECT * FROM tbl_mavad LIMIT '"+x+"',1"); //select a row in jtable and get selected row number or index (int x) and then get row data (int x) in database . how?
1 Antwort
+ 1
it's not possible this way. row numbers using LIMIT are generated randomly and are not stored anywhere, so cannot be used to link back.
if using oracle or mysql, use rowid which is unique reference to any record in database