From the course: PostgreSQL Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Create a table and insert rows of data

Create a table and insert rows of data - PostgreSQL Tutorial

From the course: PostgreSQL Essential Training

Create a table and insert rows of data

- [Instructor] Now that we know about the structure of a relational database table and the importance of data types, we can use that information to help us build a new table with the help of PG admin's dialogue-based workflow. The interface is going to look similar to what we saw when creating the fruit database and I'd like to now add a table to hold information about various types of fruit. Let's go into that fruit database and find the schema's collection. I'll expand that and find the public schema. Then right click on that. Go up to Create and then come all the way down and click Table. That'll start up the create table dialogue. The first thing we need to do is name our new table and I'll call it fruit. Then I'll switch over to the columns tab. Here, we can press the plus button over on the far right to add a new column descriptor to the table's design. Then we just need to fill in the details for each column.…

Contents