[align=left]
String sql = "select name,age from table";
String hql = "select name from table";
String hql2 = "from table";
/*
* 使用正则表达式
* 我想把上面的三条语句转换成为统计数量的语句。
* "select count(x) from table";
* 如果指定了查询列x就为查询的列名。
* 如果像第三个没有指定或者指定为"*"号,x就为*;
*
*/
[/align]
String sql = "select name,age from table";
String hql = "select name from table";
String hql2 = "from table";
/*
* 使用正则表达式
* 我想把上面的三条语句转换成为统计数量的语句。
* "select count(x) from table";
* 如果指定了查询列x就为查询的列名。
* 如果像第三个没有指定或者指定为"*"号,x就为*;
*
*/
[/align]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货