mysql
iteye_13003
这个作者很懒,什么都没留下…
展开
-
CSDN 6428632条数据mysql 32.25s插入完毕
[code="sql"]mysql> create table csdn(id int not null auto_increment primary key,username varchar(50) not null,password varchar(50) not null,email varchar(50) not null);Query OK, 0 rows affected (0.2...原创 2011-12-29 11:36:34 · 94 阅读 · 0 评论 -
mysql安装服务绿色版
1)首先安装mysqlhttp://qiaolevip.iteye.com/blog/19505322)cmd 执行 : mysqld --install mysql5.6如果执行不成功,请使用管理员权限再次执行!执行成功会提示你。 安装mysql地址:http://qiaolevip.iteye.com/blog/1950532...原创 2013-10-04 16:03:39 · 88 阅读 · 0 评论 -
mysql查询每月不重复的数据
[code="sql"]mysql> select * from product group by concat(year(last_update),'-',week(last_update),day(last_update)) order by last_update;[/code]或者[code="sql"]mysql> select * from product gro...原创 2012-10-15 11:14:03 · 365 阅读 · 0 评论 -
sql查询最后一条自增长的记录
mysql> select * from message where id = (select max(id) from message);+----+------+---------+---------------------+| id | name | content | time |+----+------+---------+-------...原创 2013-11-13 17:21:27 · 583 阅读 · 0 评论 -
mysql复制表结构或者表数据,可备份数据
If the destination table already exists, use INSERT ... SELECT to copy the result set into it. For example, if dst_tbl contains an integer column i and a string column s, the following statement copi...原创 2013-11-19 17:26:05 · 113 阅读 · 0 评论 -
mysql查询或更新单双数字的内容
select * from tbl_name where userid%2=1mysql> select * from message_bak;+----+-----------+--------------------+---------------------+| id | name | content | time ...原创 2013-11-19 17:27:38 · 258 阅读 · 0 评论 -
php读取mysql中文乱码解决
<!DOCTYPE><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>数据测试</title></head><原创 2014-04-29 14:54:02 · 324 阅读 · 0 评论 -
wampserver IP访问被禁止解除
// 点击Apache下面的httpd.conf修改:# Require all granted# onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow ...原创 2014-04-29 16:43:00 · 605 阅读 · 0 评论 -
[Warning] TIMESTAMP with implicit DEFAULT value is depreca
C:\Users\Happy>mysqld --console2014-05-02 09:46:29 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentati...原创 2014-05-02 09:50:58 · 1113 阅读 · 0 评论 -
DB2,Mysql,Sqlserver,oracle分页算法,分页语句
[size=medium][color=red]Mysql[/color][/size][code="sql"]limit = ((feeds.getPageIndex() - 1) * 10 + 1) + "," + (feeds.getPageIndex() * 10);[/code][size=medium][color=red]DB2,Sqlserver[/c...原创 2013-03-07 20:43:37 · 91 阅读 · 0 评论 -
安装绿色版mysql-5.6.14
1)下载www.mysql.com mysql安装程序,mysql-5.6.14-winx64.zip2)解压至你的本地硬盘文件夹内,如:D:\D\Database\mysql-5.6.14-winx643)根目录下新建my.ini内容如下:# Save as "my.ini" in your MySQL installed directory[mysqld]# Set ...原创 2013-10-04 16:00:38 · 153 阅读 · 0 评论 -
mysql统计多表交叉组合总数
[code="sql"]>mysql -h localhost -u root -p[/code][code="sql"]mysql> use world;Database changedmysql> show tables;+-----------------+| Tables_in_world |+-----------------+| city ...原创 2012-10-11 11:33:13 · 460 阅读 · 0 评论 -
mysql注册服务或移除服务
--注册系统服务mysqld --install mysql5.6--移除系统服务mysqld --remove mysql5.6orsc delete mysql5.6原创 2013-07-26 15:01:36 · 239 阅读 · 0 评论 -
Mysql load csdn password
[code="sql"]mysql> create table csdn(id int not null auto_increment primary key,username varchar(50) not null,password varchar(50) not null,email varchar(50) not null);Query OK, 0 rows affected (0...原创 2011-12-29 11:36:49 · 129 阅读 · 0 评论 -
MySQL CONCAT Function
[code="sql"]mysql> SELECT CONCAT('FIRST ', 'SECOND');+----------------------------+| CONCAT('FIRST ', 'SECOND') |+----------------------------+| FIRST SECOND |+--------------...原创 2011-12-31 13:50:50 · 522 阅读 · 0 评论 -
MySQL Date and Time Functions
[code="sql"]Name DescriptionADDDATE() Add datesADDTIME() Add timeCONVERT_TZ() Convert from one timezone to anotherCURDATE() Return the current dateCURRENT_DATE(), CURRENT_DATE Synonyms for...原创 2011-12-31 13:50:59 · 137 阅读 · 0 评论 -
MySQL Numeric Functions
[code="sql"]Name DescriptionABS() Returns the absolute value of numeric expression.ACOS() Returns the arccosine of numeric expression. Returns NULL if the value is not in the range -1 to 1.ASI...原创 2012-01-05 11:36:23 · 500 阅读 · 0 评论 -
MySQL String Functions
[code="sql"]Name DescriptionASCII() Return numeric value of left-most characterBIN() Return a string representation of the argumentBIT_LENGTH() Return length of argument in bitsCHAR_LENGTH()...原创 2012-01-05 11:36:46 · 193 阅读 · 0 评论 -
mysql 修改默认编码
[code="windows"]在mysql安装目录下my.ini下添加[mysqld]default-character-set=utf8[/code][code="linux"]在/etc/my.cnf下添加[mysqld]default-character-set=utf8[/code][color=red]但是以dos方式登陆数据库,se...原创 2012-01-05 11:56:24 · 95 阅读 · 0 评论 -
sql更新数据不能有from的错误解决方案
[code="sql"]You can't specify target table 'tbl_total_log' for update in FROM clause[/code][code="sql"]update tbl_total_log set unassigned = unassigned - 199 where id = (select id from (sele...原创 2012-01-31 13:43:36 · 305 阅读 · 0 评论 -
Mysql各种报表查询含实例,日报,周报,月报,时间差自动计算
[code="java"]public List retrieve(IReport report) { List list = new ArrayList(); Map map = new HashMap(); // 设置结束日期 if (null != report.getEndTime()) { map.put(ReportMeta.PROP_ENDTI...原创 2012-04-12 11:28:40 · 1498 阅读 · 0 评论 -
Java连接各种数据库,DB2、Mysql、Oracle、Hsqldb。。
[color=red][size=medium]ConnectHSQLDB.java[/size][/color][code="java"]/** * ConnectHSQLDB.java */package com.javaworkspace.connecthsqldb;import java.sql.Connection;import java.sql.Driver...原创 2012-08-26 09:38:33 · 145 阅读 · 0 评论 -
nodejs同步操作mysql
// db-util.jsvar mysql = require('mysql');var pool = mysql.createPool({ connectionLimit : 10, host: 'localhost', user: 'root', password: '', database: 'test', port: 3306});...原创 2014-10-29 15:23:16 · 2537 阅读 · 1 评论