How to find lastrow and lastcolumn of a table in oracle?
lastrow:
SELECT * FROM your_table WHERE rownum=1 ORDER BY your_auto_incre ment_field DESC
lastcolumn (i don't get it why you need this information). this is the last column's name, not column's data
SELECT coumn_name FROM user_tab_cols WHERE table_name = your_table AND column_id = (SELECT max(column_id) FROM user_tab_cols WHERE table_name = your_table)
Comment