適切なテーブル名を選ぼう
PostgreSQL のすべてのオブジェクトと同様に、テーブル名にも前のレクチャーで説明した制約があります。新しいテーブルを作成するときに問題を避けるため、許可されていない命名規則を見分けられるようにしましょう。
この演習はコースの一部です
PostgreSQL データベースの作成
演習の手順
- 不正なテーブル名を含む以下の
CREATE TABLEコマンドを削除してください。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
-- Delete me and command below if this table name is invalid
CREATE TABLE 2for1 ();
-- Delete me and command below if this table name is invalid
CREATE TABLE customers ();
-- Delete me and command below if this table name is invalid
CREATE TABLE orders ();
-- Delete me and command below if this table name is invalid
CREATE TABLE service_rendered_by_other_provider ();