Posts

Showing posts from October, 2023

PORTFOLIO/ PRACTICAL FILE: SQL Commands

  Write in A4 size paper (The first page will be as Cover page about student's Information) PORTFOLIO/ PRACTICAL FILE: SQL Commands CREATE TABLE Command: This command is used to create a new table or relation. The syntax for this command is: CREATE TABLE <table name> ( <column1> <datatype> [constraint] , <column1> <datatype> [constraint], <column1> <datatype> [constraint],  ); where []=optional The keyword CREATE TABLE is followed by the name of the table that you want to create. Then within parenthesis, you write the column definition that consists of the column name followed by its data types and optional constraints. There can be as many columns as you require. Each column definition is separated with a comma (,). All SQL statements should end with a semicolon (;). Example: CREATE TABLE Teacher ( Teacher_ID INTEGER PRIMARY KEY, First_Name VARCHAR(20), Last_Name VARCHAR(