Created
September 16, 2018 14:41
-
-
Save handuy/97ca5cdbee12f1a0d4ec89872ffe6831 to your computer and use it in GitHub Desktop.
Cú pháp chạy: psql -U postgres -f 4.sql. Chạy ở citus_master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS users; | |
DROP TABLE IF EXISTS posts; | |
DROP SCHEMA IF EXISTS course CASCADE; | |
CREATE TABLE users (id int PRIMARY KEY, name text, age int); | |
CREATE TABLE posts (id int PRIMARY KEY, title text, author_id int REFERENCES users(id)); | |
SELECT create_reference_table('users'); | |
SELECT create_reference_table('posts'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment