您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql 常用查询

2024/3/21 7:41:13发布20次查看
一.group_concat函数,以指定的分割符合并列,与group by 一起用 例:selectgroup_concat(c.columnname separator ',') group by 二.preparedstatement.return_generated_keys 得到刚刚插入记录的id preparedstatementps .setxxx …… …… ps.executeupdate(
一.group_concat函数,以指定的分割符合并列值,与group by 一起用
例:select>group_concat(c.columnname separator ',') >group by>
二.preparedstatement.return_generated_keys   得到刚刚插入记录的id
preparedstatement>ps.setxxx
……
……
ps.executeupdate();
resultset>
rs.next();
int>
三.分页查询,得到查询的总条数
select sql_calc_found_rows *>
ps =>           rs.next();
           int>
四、常见sql命令
drop table if exists `user`;create table `user` ( `uid` int(11) not null auto_incrementprimary key, `gid` int(11) default null, `username` varchar(15) not null, `password` varchar(15) not null,
foreign key (parent_id) reference parent(id) on delete cascade on>
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product