› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
bmcjxhgwy
V2EX  ›  MySQL

请教一下 mysql 中能否定义一个为列表的常量啊?

  •  
  •   bmcjxhgwy · Nov 11, 2019 · 5189 views
    This topic created in 2512 days ago, the information mentioned may be changed or developed.
    SET @motor_vehicle = ('vehicle','traffic');
    select count(*) from '表' WHERE ‘字段’ in @motor_vehicle 
    

    这样子写报错了,如何定义一个列表结构的常量呢?

    2 replies  •  2019-11-13 09:40:17 +08:00
    fuxkcsdn
        1
    fuxkcsdn  
       Nov 13, 2019 via iPhone
    用字符串拼接( concat )
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   824 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 22:18 · PVG 06:18 · LAX 15:18 · JFK 18:18
    ♥ Do have faith in what you're doing.