Heim >Datenbank >MySQL-Tutorial >MySQL中特殊的SQL用法

MySQL中特殊的SQL用法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:11:081216Durchsuche

作为数据库软件,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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn