V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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
Fteng328
V2EX  ›  MySQL

SQL acessing a table named with reserved keywords?

  •  
  •   Fteng328 ·
    fteng328 · 2013-11-29 10:22:39 +08:00 · 3090 次点击
    这是一个创建于 4011 天前的主题,其中的信息可能已经有所发展或是发生改变。
    In SQL, how do you acess tables with name "match"?

    "select * from match" gives me SQL syntax error.

    I tried "select * from [match]","select * from "match"", "select * from 'match'". Unfortunately none of these work.

    Is there a way around this? I didnt make the database schema so please dont say change the table name.

    Thanks.
    3 条回复    1970-01-01 08:00:00 +08:00
    xxr3376
        1
    xxr3376  
       2013-11-29 10:33:22 +08:00
    try `
    zorceta
        2
    zorceta  
       2013-11-29 10:36:30 +08:00
    我想问的是 你是怎么用保留关键字创建表的-.-
    Fteng328
        3
    Fteng328  
    OP
       2013-11-29 10:39:27 +08:00
    @xxr3376 problem resolved. thx~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2205 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:56 · PVG 08:56 · LAX 16:56 · JFK 19:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.