Languages
[Edit]
EN

PostgreSQL - Create table

0 points
Created by:
Wade
562

In this article, we would like to show you how to create a table in PostgreSQL.

Quick solution:

Note:

Go to the official documentation to see available DATA_TYPES.

Practical example

Edit

In this example, we create users table with the following columns and types:

  • id - INT,
  • name - VARCHAR,
  • role - VARCHAR. 

Query:

Database:

Table columns created by SQL CREATE TABLE - HeidiSQL preview
Table columns created by SQL CREATE TABLE - HeidiSQL preview

References

Edit
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - Create table

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join