mysql笔计

 

ems sql manager

http://www.sqlmanager.net/en/products/mysql/manager/download

http://download2.sqlmanager.net/download/mymanager/mymanager_lite.zip

MySQL-Front_Setup  //客户端

mysql database 

http://mysql.ntu.edu.tw/Downloads/MySQL-5.1/mysql-essential-5.1.59-win32.msi

 

mysql5.1卸装

1.sc mysql //mysql服务

2.删除C:\Documents and Settings\All Users\Application Data\MySQL所有文件

3.卸载控件面板mysql软件

4.删除C:\Program Files\MySQL下所有文件


插入数据得到自增长
在插入数据之后执行
mysql--要执行二次操作
insert into table() values();
select @@identity as id;

sqlserver
insert into table() values() select scope_identity() as id;

java 中
sql
照常用ps.executeUpdate();方法
rs = ps.getGeneratedKeys(); //ps--> PreparedStatement
if(rs.next()){ //rs ResultSet
 int cardId = rs.getLong("id");
}
mysql
ps.executeUpdate();
rs=ps.executeQuery("select @@identity as id");
if(rs.next()){
int sqlRetVal=rs.getInt("id");//自动增长的编号
}

mysql时间自动:insert-timestamp;插入数据自动是:current_timestamp
mysql清除自动增加:ALTER TABLE `表` AUTO_INCREMENT =1 

你可能感兴趣的:(mysql)