Tips Cara Menampilkan Struktur Table Di Postgresql

Pada tutorial PostgreSQL kali ini, kita akan berguru wacana Cara Menampilkan Struktur Table. Untuk menampilkan struktur sebuah table, Anda s...

A+ A-


Contoh


Sebelumnya, coba Anda tampilkan terlebih dahulu daftar table yang terdapat pada sebuah database "hris".

hris=# \d           List of relations  Schema |  Name   | Type  |  Owner --------+---------+-------+----------  public | pegawai | table | postgres  public | test    | table | postgres (2 rows) 
Dari kedua table diatas, Anda sanggup menampilkan struktur table dari table "pegawai" dengan cara memakai perintah "\d pegawai" menyerupai berikut ini:

hris=# \d pegawai               Table "public.pegawai"     Column    |         Type          | Modifiers --------------+-----------------------+-----------  id_pegawai   | character varying(5)  | not null  nama_pegawai | character varying(20) | not null  jns_kelamin  | character(1)          | not null  alamat       | character varying(20) |  honor         | numeric               |  departemen   | character varying(5)  | not null Indexes:     "pegawai_pkey" PRIMARY KEY, btree (id_pegawai)   


Related

PostgreSQL 2185533638204026576

Technology

Hot in weekRecentComments

Hot in week

Recent

Comments

item