SELECT false as "Select" from Table_Name
The SQL run in derby I got this output:
The SQL run in MYSQL I got this output:
I want to create a JTable with a check box column by using the ResultSet.
It is workable when i use derby, my JTable got a column with check box.
But when I use MYSQL, my JTable got a column with 0.
The problem is found in Which MySQL data type to use for storing boolean values
So now I'm thinking of:
- Is it possible I can configure MYSQL until it can return check box like derby does?
- Is there a function in MYSQL that can return boolean data type true/false? Not other data types.
- Is it possible I can alter the ResultSet to get the check box?
My final objective is to create a JTable with a check box column as the first column and filled with data SELECT from database. Everyone wants the easy way.
Currently I'm using this method Using Rob Camick's ListTableModel, but JTable doesnt show up
//ListTableModel model = ListTableModel.createModelFromResultSet(rs);
model = ListTableModel.createModelFromResultSet(rs);