Home > Database > Mysql Tutorial > MySQL中特殊的SQL用法

MySQL中特殊的SQL用法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:11:08
Original
1194 people have browsed it

作为数据库软件,mysql和oracle等都是基于标准的sql,但还是存在一些异同,这里对不同点进行列举:1、limit (注意行号从0开始)

作为数据库软件,mysql和Oracle等都是基于标准的sql,但还是存在一些异同,这里对不同点进行列举:

1、limit (注意行号从0开始)

limit 3,4 :第一位表示行号,第二位表示返回几行数据,这个就表示,从第4行(行号从0开始)开始返回4行数据。

limit 3 offset 4 :从行4开始取3行,,其中行号从0开始

2、where col = ‘Abc’ 和where col = ‘abc’ 相同,执行匹配的时候不区分大小写,包括= , 等

3、字符拼接,使用函数:concat ([字符列表])

4、avg,max,min,sum 等函数忽略NULL的列。

5、insert 插入多条:

可以使用:

insert into table(col1,col2)

values(p_11,p_12),(p_21,p_22);

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template