SQL Queries Interview Questions Answers 2023

Discussion RoomCategory: Database&SQLSQL Queries Interview Questions Answers 2023
Jack asked 2 years ago

Latest New Updated SQL Queries Interview Questions and Answers for freshers.

Here are some Most used SQL Commands:

CREATE TABLE: It is used to create the new table in given database.

CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype, ….. columnN datatype, PRIMARY KEY( one or more columns ) );

SELECT: It is used to select the table in given database.

SELECT column1, column2….columnN FROM table_name;

UPDATE TABLE: It is used to update the new or existing table in given database.

Syntax: UPDATE table_name SET column1 = value1, column2 = value2….columnN=valueN [ WHERE CONDITION ];

INSERT INTO: It is used to insert the values the new table in given database.

Syntax: INSERT INTO table_name( column1, column2….columnN) VALUES ( value1, value2….valueN);

DELETE: It is used to delete the specific row in table.

Syntax: DELETE FROM table_name WHERE {CONDITION};

DROP TABLE: It is used to removes the one or more table in given database.

Syntax: DROP TABLE table_name;

TRUNCATE TABLE: It is used to remove the all rows in a database table

Syntax: TRUNCATE TABLE table_name;

ALTER TABLE : It is used to add, delete/drop or modify columns in the existing table.

Syntax:  ALTER TABLE table_name {ADD|DROP|MODIFY} column_name {data_type};

CREATE DATABASE : It is used to create the new database.

Syntax: CREATE DATABASE database_name;

DROP DATABASE: It is used to delete the new database.

Syntax: DROP DATABASE database_name;

USE DATABASE: It is used to select a database and perform SQL operations into that database.

Syntax: USE DATABASE database_name;

 

Watch Full Video on YouTube for Questions with Examples:

Scroll to Top