0% found this document useful (0 votes)
114 views

80 Top SQL Interview Questions and Answers (2024) DataCamp - 3

The document discusses SQL, including what it is, its main applications, types of SQL commands, common commands, what a database is, and types of DBMS. SQL is a programming language used to interact with relational database management systems, allowing querying, updating, inserting and removing data from tables. Main SQL command types are DDL, DML, DCL, TCL, and DQL.

Uploaded by

endickhk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

80 Top SQL Interview Questions and Answers (2024) DataCamp - 3

The document discusses SQL, including what it is, its main applications, types of SQL commands, common commands, what a database is, and types of DBMS. SQL is a programming language used to interact with relational database management systems, allowing querying, updating, inserting and removing data from tables. Main SQL command types are DDL, DML, DCL, TCL, and DQL.

Uploaded by

endickhk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1. What is SQL?

It stands for Structured Query Language. A

programming language used for interaction with


relational database management systems (RDBMS).

This includes fetching, updating, inserting, and

removing data from tables.

2. What are SQL dialects? Give some examples.

The various versions of SQL, both free and paid, are also

called SQL dialects. All the flavors of SQL have a very

similar syntax and vary insignificantly only in additional

functionality. Some examples are Microsoft SQL Server,

PostgreSQL, MySQL, SQLite, T-SQL, Oracle, and

MongoDB.

3. What are the main applications of SQL?

Using SQL, we can:

• create, delete, and update tables in a database

• access, manipulate, and modify data in a table

• retrieve and summarize the necessary information from

a table or several tables

• add or remove certain rows or columns from a table

All in all, SQL allows querying a database in multiple

ways. In addition, SQL easily integrates with other


programming languages, such as Python or R, so we can

use their combined power.

4. What is an SQL statement? Give some


examples.

Also known as an SQL command. It's a string of

characters interpreted by the SQL engine as a legal


command and executed accordingly. Some examples of

SQL statements are SELECT, CREATE, DELETE, DROP,

REVOKE, and so on.

5. What types of SQL commands (or SQL


subsets) do you know?

• Data Definition Language (DDL) – to define and

modify the structure of a database.

• Data Manipulation Language (DML) – to access,


manipulate, and modify data in a database.

• Data Control Language (DCL) – to control user

access to the data in the database and give or revoke

privileges to a specific user or a group of users.

• Transaction Control Language (TCL) – to control

transactions in a database.

• Data Query Language (DQL) – to perform queries

on the data in a database to retrieve the necessary

information from it.


6. Give some examples of common SQL
commands of each type.

• DDL: CREATE, ALTER TABLE, DROP, TRUNCATE, and ADD

COLUMN

• DML: UPDATE, DELETE, and INSERT

• DCL: GRANT and REVOKE

• TCL: COMMIT, SET TRANSACTION, ROLLBACK, and

SAVEPOINT

• DQL: – SELECT

7. What is a database?

A structured storage space where the data is kept in

many tables and organized so that the necessary

information can be easily fetched, manipulated, and

summarized.

8. What is DBMS, and what types of DBMS do


you know?

It stands for Database Management System, a software

package used to perform various operations on the data

stored in a database, such as accessing, updating,

wrangling, inserting, and removing data. There are

various types of DBMS, such as relational, hierarchical,

network, graph, or object-oriented. These types are

You might also like