开发者

problem with bit in mysql

resultset = statemet.executequery("select shift+0 from sportman");

string x = resultset.getstring(开发者_StackOverflow社区"shift");

but second line throw exception:

Column 'shift' not found.

shift is bit(8) and i want to show it to form '000101'.


Integer.toBinaryString(Integer.valueOf(resultset.getString("shift+0")))

Result is not zero-padded to the width you want though. You may need to add that yourself later.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜