AQA A Level · Computer Science 7517

結構化查詢語言(SQL):练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「結構化查詢語言(SQL)」。

10 道题目22 免费,无需注册
第 1 题
1

In SQL, which keyword is used in conjunction with SELECT to return only unique values from a column?

第 2 题
1

Consider the following SQL query:

SELECT ProductName
FROM Products
WHERE Price BETWEEN 10 AND 20;

What is the result of this query?

第 3 题
1

A database contains two tables: Student (StudentID, Name) and Enrollment (EnrollmentID, StudentID, Course).
Which query correctly retrieves the names of students enrolled in the 'Computer Science' course?

第 4 题
1

Which SQL command is used to add a new record to a table in a relational database?

第 5 题
1

Which of the following SQL statements correctly changes the 'City' value to 'London' for all records in the 'Customers' table where the 'ID' is 5?

第 6 题
2

State the SQL command used to remove all records from a table named LogData where the status is 'expired'.

先自己写一遍答案,再对照解题步骤。

第 7 题
3

In SQL, what is the purpose of the LIKE operator, and which wildcard character is used to represent zero or more characters?

先自己写一遍答案,再对照解题步骤。

第 8 题
5

In SQL, what is the specific difference between using a primary key and a foreign key when establishing relationships between two tables?

先自己写一遍答案,再对照解题步骤。

第 9 题
3

Write a SQL query to retrieve the FirstName and LastName of all students from a table named Students who scored more than 80 marks in a subject called 'Computer Science'. Assume the Students table is linked to a Grades table via StudentID.

先自己写一遍答案,再对照解题步骤。

第 10 题
4

A developer needs to define a new table Project using SQL. The table must include:
- ProjectID: An integer that serves as the primary key.
- ProjectName: A string up to 50 characters, which cannot be null.
- StartDate: A date field.
- Budget: A decimal value representing currency.

Write the SQL DDL (Data Definition Language) command to create this table.

先自己写一遍答案,再对照解题步骤。

* thinka 提供的内容由 AI 生成,未必在任何情况下都完全准确或最新,请结合官方教材与教师指导使用。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习