The SQL AND, OR and NOT Operators The WHERE clause can be combined with AND , OR , and NOT operators. The AND and OR operators are used to filter records based on more than one condition: The AND operator displays a record if all the con…
The SQL WHERE Clause The WHERE clause is used to filter records. It is used to extract only those records that fulfill a specified condition. WHERE Syntax SELECT column1 , column2, ... FROM table_name WHERE condition ; Note: The WHERE cl…
The SQL DROP TABLE Statement The DROP TABLE statement is used to drop an existing table in a database. Syntax DROP TABLE table_name ; Note : Be careful before dropping a table. Deleting a table will result in loss of complete information stor…
The SQL DROP DATABASE Statement The DROP DATABASE statement is used to drop an existing SQL database. Syntax DROP DATABASE databasename ; Note: Be careful before dropping a database. Deleting a database will result in loss of complete informa…
SQL ALTER TABLE Statement The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. ALTER TABLE - ADD Column To add a …
The SQL CREATE TABLE Statement The CREATE TABLE statement is used to create a new table in a database. Syntax CREATE TABLE table_name ( column1 datatype , column2 datatype , column3 datatype , .... ); The column parameters spec…
The SQL CREATE DATABASE Statement The CREATE DATABASE statement is used to create a new SQL database. Syntax CREATE DATABASE databasename ; CREATE DATABASE Example The following SQL statement creates a database called "testDB": Examp…
The SQL INSERT INTO Statement The INSERT INTO statement is used to insert new records in a table. INSERT INTO Syntax It is possible to write the INSERT INTO statement in two ways: 1. Specify both the column names and the values to be inserted: INS…