Free Back-End Development Technical (SQL) Questions and Answers — Questions and Answers
Question 1: What exactly does SQL mean?
- Structured Query Language (Correct answer)
- Structured Question Language
- Strong Question Language
Correct answer: Structured Query Language
SQL stands for Structured Query Language, the standard language for querying and managing relational databases. The 'Question Language' variants are incorrect — the 'Q' is for Query, not Question.
Question 2: Which SQL command is employed to retrieve data from a database?
- Extract
- Select (Correct answer)
- Open
- Get
Correct answer: Select
Explanation: <br> The SELECT statement is used to extract data from a database. It allows you to specify which columns you want to retrieve from a table and any filtering criteria or sorting instructions that you want to apply to the data.
Question 3: How does one update data in a database using SQL?
- Save AS
- Update (Correct answer)
- Save as
- Modify
Correct answer: Update
Explanation: <br> The UPDATE statement is used to modify or update data in a database. It allows you to specify which table you want to update, which columns you want to modify, and the new values you want to set for those columns.
Question 4: How do you delete data from a database using SQL?
- COLLAPSE
- DELETE (Correct answer)
- REMOVE
Correct answer: DELETE
Explanation: <br> The DELETE statement is used to delete data from a database. It allows you to specify which table you want to delete data from and any filtering criteria to identify which rows should be deleted.
Question 5: Which SQL statement is employed when new data is to be added to a database?
- Add New
- Insert New
- Add Record
- Insert Into (Correct answer)
Correct answer: Insert Into
Explanation: <br> The INSERT INTO statement is used to insert new data into a database. It allows you to specify which table you want to insert data into and the values that should be inserted into each column.
Question 6: How do you use SQL to choose the "FirstName" column from the "Persons" table?
- SELECT FirstName FROM Persons (Correct answer)
- EXTRACT FirstName FROM Persons
- SELECT Persons.FirstName
Correct answer: SELECT FirstName FROM Persons
Explanation: <br> To select a column named "FirstName" from a table named "Persons" in SQL, you would use the following SELECT statement: <br> <br> SELECT FirstName FROM Persons;
Question 7: How do you use SQL to select every column from the "Persons" table?
- SELECT * FROM Persons (Correct answer)
- SELECT *.Persons
- SELECT Persons
- SELECT [all] FROM Persons
Correct answer: SELECT * FROM Persons
Explanation: <br> To select all columns from a table named "Persons" in SQL, you would use the following SELECT statement: <br> <br> SELECT * FROM Persons;
What exactly does SQL mean?