Thursday , June 13 2024

Create Table Command In Postgresql

In this article, I explain how we can create the new table to be created based on a different table, with and without data.

I will use veliler table for this example.

First, let’s see veliler table.

With the help of the create table command below, we can create the same veliler table without data.

With the help of the create table command below, we create the same veliler table with a different name with the data in it.

As seen above, we created our data and we created and transferred veliler_datalı table with 8 records in it.

While performing these operations, the data types are generally the same, but in some cases, postgresql can choose the data type itself and set the appropriate data type.

After these operations, I recommend you to check the data types.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories