In SQL, which keyword is used in conjunction with SELECT to return only unique values from a column?
AQA A Level · Computer Science 7517
結構化查詢語言(SQL):練習題
5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「結構化查詢語言(SQL)」。
Consider the following SQL query:
SELECT ProductName
FROM Products
WHERE Price BETWEEN 10 AND 20;
What is the result of this query?
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?
Which SQL command is used to add a new record to a table in a relational database?
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?
State the SQL command used to remove all records from a table named LogData where the status is 'expired'.
先自己寫一次答案,再對照解題步驟。
In SQL, what is the purpose of the LIKE operator, and which wildcard character is used to represent zero or more characters?
先自己寫一次答案,再對照解題步驟。
In SQL, what is the specific difference between using a primary key and a foreign key when establishing relationships between two tables?
先自己寫一次答案,再對照解題步驟。
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.
先自己寫一次答案,再對照解題步驟。
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生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。
想多做幾條同類題目?立即開始練習呢個課題,即做即批改。
立即練習