how can i get the column names in a table
843854Nov 19 2003 — edited Nov 26 2003hello
in one of my project,i want to get the column names of a unknown table,i can get it by the ResultSetMetaData.getColumnCount(int col) method,but i must execute a query first,because i know nothing about the table,the only choice is "select * from myTable",then navigate the resultset.but maybe this table have thousands of records,i only want to get the COLUMN NAME,don't the record,so this method is not effective,who can give me a more effective code snippet?such as retrieve the column names of the emp table(in oracle sample database-----scott/tiger).
thank you!