SQL Create Table – SQL TUTORIAL | Software Testing Material

SQL Create Table:

The SQL CREATE TABLE statement is used to create a new table in a database. Creating a table involves naming the table and defining its columns and data type of each column.

SQL Create Table Syntax:

The column_name_1 parameters specify the names of the columns of the table.

The data_type parameter specifies the data type of the column (e.g. char, varchar, integer, decimal, float, etc.).

Example:

Creating a Table in the Database.

Copy the above Create Table statement and execute it. You could see “Command(s) completed successfully” in the result console.

SQL Create Table

To verify whether the table is created or not. You need to write Select Query. We will see Select Query in detail in later posts. Click here to view detailed post on Select Query.

Also to view the complete table structure, use the following statement.

SQL Information Schema

Now, you have SCOREBOARD table available in the database. We could use this table SCOREBOARD to store required information.

In the next tutorial, we will see How To Retrive the data from the table using SELECT Query

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

SQL Create Table

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Leave a Comment

Share via
Copy link
Powered by Social Snap