SQL is the dominant technology for accessing application data. It is increasingly becoming a performance bottleneck when it comes to scalability. Given its dominance, SQL is a crucial skill for all engineers.
Conditional statements are a feature of most programming and query languages. They allow the programmer to control what computations are carried out based on a Boolean condition.
The UPDATE statement is used to modify the existing records in a table and is one of the most used operations for working with the database.
Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
A table containing the students enrolled in a yearly course has incorrect data in records with ids between 20 and 100 (inclusive).
TABLE enrollments id INTEGER NOT NULL PRIMARY KEY year INTEGER NOT NULL studentId INTEGER NOT NULL
Write a query that updates the field 'year' of every faulty record to 2015.
- Ids equal to 20 and 100: Wrong answer
- Ids between 20 and 100: Wrong answer
- All ids: Wrong answer