Showing posts from October, 2022

SQL AND, OR and NOT Operators

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…

Operators in The WHERE Clause

Operators in The WHERE Clause The following operators can be used in the  WHERE  clause: Operator                    |                                           Description   =                        |                                                â€¦

SQL WHERE Clause

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…

SQL DROP TABLE Statement

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…

SQL DROP DATABASE Statement

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…

7.SQL ALTER TABLE Statement

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 …

6.SQL CREATE TABLE Statement

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…

5.SQL CREATE DATABASE Statement

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…

4.SQL INSERT INTO Statement

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…

Load More
That is All