pgAdmin tool. Expand nodes in your database and go to the
Tables node. Right click the
Table node and choose
Create-Table window appears. In
Name field write name of the table.
Go to the
Click the plus icon to add column to the table. Click into
Name field to write name of the column.
For first write
bigserial datatype if the values may be autoincrement. Set
NOT NULL and
PRIMARY KEY for this column.
Click the plus icon to add another column to the table. Write name of column and datatype.
Save button to save all columns. Go to the
Databases node and look at
The new people table is in it. The columns are definied on it.
Check if autoincremet work.Open SQL editor to right click the name of the table and choose
In SQL editor in
pgAdmin write code:
INSERT INTO people(name) VALUES('Anne');