自己经常用的 SQL语句

来源:互联网 发布:mac文件整理 智能 编辑:程序博客网 时间:2024/06/05 17:48

增加
"insert into 表名() values() "
删除
"delete 表名 where 表名_id="
更改
"update upload set upload_name=?,upload_photo=? where upload_id=?"
查询所有
"select * from upload"
查询一个
"select * from upload where upload_id="+id;
页面查询
"select top 3 * from upload where upload_id not in(select top "+3*page+" upload_id from upload)";

totlePage=(int)Math.ceil(((double)totleCount/10));

原创粉丝点击