Home > Articles > Data > SQL

  • Print
  • + Share This
From the author of

Creating Tables

After installation is complete and users have been created, the database tables must be defined to hold the data. Table creation can be accomplished using the create table SQL command via the psql command-interpreter. For instance, to define a table named employees so that it holds employee information, we could issue the following command:

psql=>CREATE TABLE employee (name VARCHAR(40), ssn VARCHAR(11));

This would create a two-field table that could then be loaded by using the appropriate INSERT commands.

  • + Share This
  • 🔖 Save To Your Account