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 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習