zoukankan      html  css  js  c++  java
  • mysql 函数

    一、字段值是按照逗号分割保存

    SELECT GROUP_CONCAT(option_name) busiTypeName,GROUP_CONCAT(option_code) option_code FROM sys_option_conf WHERE option_code REGEXP (
    SELECT REPLACE (( SELECT busi_type FROM cont_base_info WHERE id = '878228366862319616'), ',','|'))

    二、将查询出来的值进行逗号分割保存

     GROUP_CONCAT(option_name) busiTypeName

    三、相关信息

    select a.* ,b.* from (SELECT
    cbi.*,soc.option_name as contStatusName,soc1.option_name as contTypeName
    FROM cont_base_info cbi
    left join sys_option_conf soc on cbi.cont_status = soc.option_code
    left join sys_option_conf soc1 on cbi.cont_type = soc1.option_code
    WHERE cbi.data_status = 100101 and cbi.id = '878228366862319616' ) a ,
    (SELECT GROUP_CONCAT(option_name) busiTypeName,GROUP_CONCAT(option_code) option_code FROM sys_option_conf WHERE option_code REGEXP (
    SELECT REPLACE (( SELECT busi_type FROM cont_base_info WHERE id = '878228366862319616'), ',','|'))) b
    where a.busi_type = b.option_code

  • 相关阅读:
    函数指针与变长参数列表
    Finding intersection and union of two sets.
    依赖注入
    可达性分析算法
    java 虚拟机栈
    Java 堆
    java虚拟机>>程序计数器
    Java方法区(Method Area)
    Java 运行时常量池
    java引用
  • 原文地址:https://www.cnblogs.com/flyShare/p/15175530.html
Copyright © 2011-2022 走看看