V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
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 · Nov 29, 2013 · 3875 views
    This topic created in 4538 days ago, the information mentioned may be changed or developed.
    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 replies    1970-01-01 08:00:00 +08:00
    xxr3376
        1
    xxr3376  
       Nov 29, 2013
    try `
    zorceta
        2
    zorceta  
       Nov 29, 2013
    我想问的是 你是怎么用保留关键字创建表的-.-
    Fteng328
        3
    Fteng328  
    OP
       Nov 29, 2013
    @xxr3376 problem resolved. thx~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1280 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:52 · PVG 00:52 · LAX 09:52 · JFK 12:52
    ♥ Do have faith in what you're doing.