AQA A Level · Computer Science 7517

Structured Query Language (SQL): แบบฝึกหัด

ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Structured Query Language (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 วินาที

อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ

เริ่มฝึกเลย