Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close

Welcome to The Basics of Creating Tables in SQL! This is the first course in the Creating Database Structure track.

In this course, you will learn the basics of creating and modifying tables in relational databases. First, we will show you the syntax of SQL’s CREATE TABLE command. Then you will master how CREATE TABLE works. We will also explain common table constraints: primary keys, foreign keys, and NOT NULL.

When you create a table in a relational database, you should always set up a primary key. This is a column or a set of columns that uniquely identifies each table row. We will show you how primary keys work and how you can define a single- or multi-column primary key.

A foreign key is a column or a set of columns that refers to another table. You will learn how to use these to establish relationships between tables.

Finally, you'll discover how to set up a NOT NULL constraint for a column. NOT NULL forces the user to always give a non-null value for this column.

This interactive tutorial is based on standard SQL and will give you the necessary foundation to work with any relational database engine. The syntax for CREATE TABLE and ALTER TABLE commands will work in all popular relational database management systems, including SQL Server, MySQL, Oracle, and PostgreSQL.

This is a course for beginner IT professionals and students. Are you a programmer, developer, or junior database administrator (DBA)? Do you need to learn to create tables in a relational database? Do you need a place to practise the SQL you've been learning? Then this course is for you.

In The Basics of Creating Tables in SQL, we:

  • Discuss the syntax of the CREATE TABLE command in SQL.
  • Define the concept, use, and creation of the PRIMARY KEY in SQL.
  • Show how NOT NULL constraints work and how to define them.
  • Define the concept, use, and creation of the FOREIGN KEY in SQL.
  • Demonstrate how to remove a table using DROP TABLE.
  • Explain how to rename tables and columns with the ALTER TABLE syntax.

This course is interactive. You’ll learn how to create tables by writing real SQL commands and solving exercises in your web browser. Our web-based platform runs your command and verifies your solution. You don’t need to install anything on your computer.

What Do You Need to Take This Course?

  • A web browser and an internet connection.
  • Knowledge of SQL, including SELECT, INSERT, UPDATE, and DELETE.

This Course Will Teach You How To:

  • Create a table in a relational database.
  • Define a primary key.
  • Define NOT NULL constraints.
  • Define foreign keys.
  • Remove a table from a database.
  • Alter and rename tables and columns.

Who Should Take This Course?

  • Beginning developers and programmers
  • Beginning database administrators (DBAs)
  • Students taking classes in relational databases
  • Anyone who wants to learn how to create tables in a database

    Table of contents

    Progress: 0% completed 0 of 80 exercises done

    1. Create Your First Table

    Remember what tables are? You will learn how to create simple tables.

    More details Less

    2. Primary keys and NOT NULL columns

    How to tell the database that an id column is really an identifier and that a column value is obligatory.

    More details Less

    3. Foreign Keys

    How to properly reference one table in another table.

    More details Less

    4. Modifying table structure

    How to add, remove a table or change the structure of an existing table in a database.

    More details Less

    5. Final quiz

    Time to test your knowledge!

    More details Less

    Reviews

    Average rating

    0/50.0 (0)

    Details

    5 Stars 0%
    4 Stars 0%
    3 Stars 0%
    2 Stars 0%
    1 Stars 0%
      Load more reviews

      Comments

      0