SQL table awesome basics you need

If you are familiar with Excel then you will know how a table in RDBMS works, and data stored in Tables. You can say the next version of Excel is RDBMS Table.

This post is useful for you to start learning about Table and accessing it using SQL.

An SQL table consists of scalar (single-value) data arranged in columns and rows. Relational database tables have the following components:

  • A unique table name
  • Unique names for each of the columns in the table
  • At least one column
  • Data types, domains, and constraints that specify the type of data and its range of values for each column in the table
  • A structure in which data in one column of the table has the same meaning in every row of the table
  • Zero or more rows that represent physical or logical entities

When naming a table, bear in mind that no two tables you create can have the same name. However, table names in the SQL database need be unique only among all of the tables created (or owned) by an individual user.

Also read: 32 Complex SQL queries to instant knowledge

As such, if two users—SONU and KIRI, for example—were to create tables in an SQL database, both of them could create a table named Stocks.

However, neither of them could create two tables named Stock in the same schema.

With this you will know table names and how the DBMS uses the owner name and schema name to make the names unique across all of the tables in the database.

The important thing to know is that you must give your table a name, and you don’t have to worry about what other people have named their tables.

When selecting a table name, analyze the columns you plan to include in the table, and use a name that summarizes the table’s contents.

The following are the SQL queries you can use from creating Table to all complex SQL Queries.


Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.