本人博客已迁移至:https://z2h.cn

精致码农 • 王亮

Be humble, communicate clearly, and respect others.

本人博客已迁移至: z2h.cn

随笔分类 -  [04] 数据库

摘要:准备 本文环境信息: 软件版本 CentOS CentOS 7.4 MySQL 8.0.x 安装前先更新系统所有包 sudo yum update 安装 1. 添加 Yum 包 wget https://dev.mysql.com/get/mysql80-community-release-el7- 阅读全文
posted @ 2018-10-09 14:15 精致码农 阅读(10188) 评论(1) 推荐(0) 编辑
摘要:例如,要将下面的数据以GROUP_ID进行分组,一组一行,一组中的多个PRODUCT_ID用逗号分隔,select 出来成如下结果:在Sql Server中,我目前想到的一种方法是写一个函数,如下:CREATE FUNCTION [dbo].[FN_GetProductsByGroup]( @GroupId int)RETURNS [nvarchar](4000)ASBEGIN DECLARE @ReturnValue [nvarchar](1000) SET @ReturnValue = '' SELECT @ReturnValue=@ReturnValue + RT... 阅读全文
posted @ 2013-07-26 22:41 精致码农 阅读(19285) 评论(8) 推荐(0) 编辑