LoginSignup
0
0

More than 5 years have passed since last update.

PostgreSQLでカラム(フィールド名)にダブルクォーテーション付ける例

Posted at

WordPress For PostgreSQLのフィールド名に"ID" biting NOT NULL DAFAULT nextvalと言う
カラム(フィールド名)IDにダブルクォーテーション付ける例が出て来ます。
この様な例はカラム名に予約語(SQL文にすでに有るもの)等を使う場合の例ですがここではID(予約語?)を定義したためダブルクォーテーションでかこまれている。
以下テーブル定義文抜粋
CREATE TABLE wp_posts
(
"ID" bigint NOT NULL DEFAULT nextval(('wp_posts_seq'::text)::regclass),
post_author bigint NOT NULL DEFAULT 0::bigint,
post_date timestamp without time zone NOT NULL DEFAULT now(),
post_date_gmt timestamp without time zone NOT NULL DEFAULT timezone('gmt'::text, now()),
post_content text NOT NULL,
post_title text NOT NULL,............
..........
以下略

0
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
0
0