Skip to main content

What is SQL? What is SQL used for?

SQL (Structured Query Language) is a programming language built specifically for working with databases. It lets you communicate with a database to retrieve, change, or manage information.

The main points

  1. Querying data: SQL is used to find and pull out the data you need. For example, "list every employee over 30".
  2. Changing data: SQL lets you add, change, and delete records in a database.
  3. Creating and managing the database's structure: SQL lets you create tables, define fields, set up relationships between tables.
  4. Access control and security: SQL lets you restrict user rights, who can see or change what.

Example queries:

  • SELECT * FROM Employees;, list every employee.
  • INSERT INTO Employees (Name, Age) VALUES ('Ivan', 30);, add a new employee.
  • UPDATE Employees SET Age = 31 WHERE Name = 'Ivan';, change an age.
  • DELETE FROM Employees WHERE Name = 'Ivan';, delete a record.

Put simply, SQL is the language you use to "talk" to a database: you query the information you need and manage it.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.