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

【PostgreSQL】WHERE句に指定する文字列と数値の書き分け

Last updated at Posted at 2024-09-08

はじめに

本記事ではSQL学習で躓いたポイントを記録します。

概要

PostgreSQLを書く際、WHERE句で「""」を使ったら弾かれたので備忘録として仕様を記録します。

詳細

文字列指定の場合

test
SELECT *
FROM books 
WHERE name = '宇宙の歴史';

数値指定の場合

test2
SELECT *
FROM books 
WHERE number = 12;

なお、ダブルコーテーションを使うとWEHRE句で認識されません。

参考

以上です。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?