diff options
| author | Shulhan <ms@kilabit.info> | 2025-11-26 10:36:23 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-12-05 01:07:27 +0700 |
| commit | b6009906d0359cfc44e7a8ef67371ab52f30aa00 (patch) | |
| tree | 69fa4fdc5793f5d1ecaf9f750def4b3dd5f6a238 /_content/doc/tutorial/database-access/data-access/create-tables.sql | |
| parent | a7c3ec9685f01663bd0ddeabec85842b7fad4a4a (diff) | |
| download | golang-id-web-b6009906d0359cfc44e7a8ef67371ab52f30aa00.tar.xz | |
tutorial: terjemahkan "Tutorial: Accessing a relational database"
Tutorial asli ada di https://go.dev/doc/tutorial/database-access .
Diffstat (limited to '_content/doc/tutorial/database-access/data-access/create-tables.sql')
| -rw-r--r-- | _content/doc/tutorial/database-access/data-access/create-tables.sql | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/_content/doc/tutorial/database-access/data-access/create-tables.sql b/_content/doc/tutorial/database-access/data-access/create-tables.sql new file mode 100644 index 0000000..63290a0 --- /dev/null +++ b/_content/doc/tutorial/database-access/data-access/create-tables.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS album; +CREATE TABLE album ( + id SERIAL, + title VARCHAR(128) NOT NULL, + artist VARCHAR(255) NOT NULL, + price DECIMAL(5,2) NOT NULL, + PRIMARY KEY (id) +); + +INSERT INTO album + (title, artist, price) +VALUES + ('Blue Train', 'John Coltrane', 56.99), + ('Giant Steps', 'John Coltrane', 63.99), + ('Jeru', 'Gerry Mulligan', 17.99), + ('Sarah Vaughan', 'Sarah Vaughan', 34.98); |
