码迷,mamicode.com
首页 > 数据库 > 详细

Mysql与SQLserver区别

时间:2018-09-28 22:04:24      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:select   count   begin   ifnull   必须   删除存储   行存储   拼接   concat_ws   

1、为空

  SQLserver用isnull

  Myserver用ifnull

2、全球唯一标识符 

  SQLserver用newid()

  Myserver用uuid()

3、以分隔符拼接字符串

  concat_ws(‘分隔符‘,分隔字段用逗号隔开)

4、字符串拼接

  select count(‘gsdg‘,‘dgf‘,‘sdf‘)

  执行后:gsdgdgfsdf

5、SQLserver用top

  myserver用limit

  用法:select * from class limit 0,1  (其中0代表第一行开始,1代表取一条)

6、创建存储过程(关键字必须是procedure不能是proc)

  create procedure getstudent();

  begin

  select count(*) from student

  end

7、执行存储过程

  call getstudent()

8、删除存储过程(存储过程不能修改,只能删除后再创建)

  drop procedure 存储过程名;

Mysql与SQLserver区别

标签:select   count   begin   ifnull   必须   删除存储   行存储   拼接   concat_ws   

原文地址:https://www.cnblogs.com/HuangLiming/p/9721000.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!