Re: ORDER BY in Netbeans...
Quote:
Originally Posted by Blind Melon
... I want to have a function (in one of my classes) execute that command so it reorganizes the database table from that class
Can you explain what you mean a little more clearly - perhaps a couple of examples might help...
If you want to make the column name in the 'ORDER BY' clause a variable, you just tack a String variable into your SQL expression:
Code:
String sqlExpression = "... ORDER BY " + columnName;
A prudent question is one-half of wisdom...
F. Bacon