Creating Tables
Background
A table is created in a database and can be saved in different databases. Tables under different schemas in a database can have the same name. Before creating a table, refer to Planning a Storage Model.
Procedure
1 2 3 4 5 6 7 |
openGauss=# CREATE TABLE customer_t1 ( c_customer_sk integer, c_customer_id char(5), c_first_name char(6), c_last_name char(8) ); |
If the following information is displayed, the table has been created:
1
|
CREATE TABLE |
c_customer_sk, c_customer_id, c_first_name, and c_last_name are the column names of the table. integer, char(5), char(6), and char(8) are column name types.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot