2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PRESTOでテーブル項目名にselectとかfromなどがついてる場合の対処方法

2
Last updated at Posted at 2020-08-26

PRESTOでデータ抽出する時に、テーブル項目名がselectとかfromになっている場合の対処方法

抽出方法


SELECT
  "select"  -- ""で囲んであげる
  , "from"  -- ""で囲んであげる
FROM
  TABLE1

こんな感じで**「""」で囲めば抽出可能**です。
こうしないと、**mismatched input 'from'**などとエラーが表示されて実行できません。

テーブル項目名にfromとか、本当やめて欲しいのですが、前提として抽出することが意識されてない場合、ややつけられやすい項目名でもある気がします。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?