易截截图软件、单文件、免安装、纯绿色、仅160KB

Mysql limit用法

1.SELECT
 
*
 
from
 
table
 LIMIT
1
,
20
;  
//
 检索记录行
2-21
   第一个参数:查询起始行(从0开始)
   第二个参数:查询几条记录
2.
SELECT
 
*
 
from
 
table
 LIMIT
5
,
-
1

//
 检索记录行
6
-
last.
3.
SELECT
 
*
 
from
 
table
 LIMIT 
5
;     
//
检索前 
5
 个记录行


相关文档:

mysql 乱码问题。

show variables like 'character%';查看字符编码
--更改字符集
SET character_set_client = utf-8 ;
SET character_set_connection = utf-8 ;
SET character_set_database = utf-8 ;
SET character_set_results = utf-8 ;
SET character_set_server = utf-8 ;
SET collation_connection = utf8 ;
SET colla ......

C#连接mysql数据库

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......

MYSQL中的 constraint 与 CONSTRAINT

一直习惯使用小写的SQL保留字,没想到今天居然遇到了麻烦哈!!和谐一下MYSQL啦!
环境:Server version: 5.1.37-1ubuntu5 (Ubuntu)
alter table child_table_name
add constraint constraint_name

foreign key (column_1)
references reference_table_name(reference_column_1);

ALTER  TABLE child_t ......

MySQL 字符串函数:字符串截取

截取province字符串中第一个<br>前的字符串~!
update lcjd
set  `province` = substring_index( `province` , '<br>', '1' );
在需要添加‘0’的位置添加一个‘0’
update lcjd
set lc_name2 = concat('0', lc_name2)
WHERE length(lc_name2) = 3
http://www.sqlstudy.com/s ......

mysql alter 语句用法,添加、修改、删除字段等


//主键
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//增加一个新列
alter table t2 add d timestamp;
alter table infos add ex tinyint not null default '0';
//删除列
alter table t2 drop column c;
//重命名列
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号