码迷,mamicode.com
首页 > 数据库 > 详细

mysql命令

时间:2015-03-30 18:01:23      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

1、查询mysql timeout相关的变量值

SHOW VARIABLES LIKE "%timeout%"

2、可以插入部分字段的值(id字段自增)

INSERT into weightTB(date,weightNum) values(‘2015-03-23 16:30:21‘,‘www‘);

3、创建表

String createTB_sql = "CREATE TABLE "
                    + tbName
                    + "(date char(255)not null primary key,morningTime char(255),morningWeightNum char(5),nightTime char(255),nightWeightNum char(5));";
  4、插入语句

String date_insert_sql = "INSERT into " + tbName + "(date) values(‘"
                + strDate + "‘);";

5、条件查询语句

String select_sql = "select * from " + tbName + " where date=‘"
                + strDate + "‘";

mysql命令

标签:

原文地址:http://www.cnblogs.com/NeilLing/p/4378511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!