Câu lệnh SQL nào dưới đây là đúng để chọn các bản ghi từ bảng employees với salary lớn hơn 5000 và theo thứ tự giảm dần của salary?
@tbinh1768/TIN ĐS HK1

Quiz
•
Computers
•
11th Grade
•
Medium
bình thanh
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
SELECT * FROM employees WHERE salary > 5000 ORDER BY salary ASC;
SELECT * FROM employees WHERE salary > 5000 ORDER BY salary DESC;
SELECT * FROM employees ORDER BY salary DESC WHERE salary > 5000;
SELECT * FROM employees ORDER BY salary ASC HAVING salary > 5000;
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Câu lệnh nào trong SQL dùng để chọn các bản ghi không có giá trị NULL?
SELECT * FROM students WHERE age IS NOT NULL;
SELECT * FROM students WHERE age != NULL;
SELECT * FROM students WHERE age = NULL;
SELECT * FROM students WHERE age <> NULL;
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Để tìm tất cả các bản ghi từ bảng students(id, ten, points) mà có điểm lớn hơn 8, câu lệnh SQL đúng là gì?
SELECT * FROM students WHERE points > 8;
SELECT * FROM students WHERE points = 8;
SELECT id, ten, points FROM students WHERE points > 8;
SELECT * FROM students HAVING points > 8;
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Bảng có các cột: hocsinh(ID, Name, diem)
Câu lệnh SQL để lấy tất cả các cột từ bảng học sinh: SELECT * FROM Table hocsinh;
Câu lệnh lọc ra những học sinh có điểm lớn hơn 8: SELECT * FROM hocsinh WHERE diem = 8;
Xoá một học sinh có mã (id) là 5 thì: DELETE FROM hocsinh WHERE ID=5;
Thêm một học sinh có mã (id) là 10 thì: INSERT hocsinh VALUES(10, ‘Nguyễn Duy Anh’, 9)
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Câu lệnh SQL nào dưới đây được sử dụng để lấy tất cả các cột từ bảng students?
SELECT * FROM students;
SELECT ALL FROM students;
SELECT columns FROM students;
SELECT students FROM *;
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Câu lệnh nào dưới đây được sử dụng để thay đổi giá trị của cột age cho tất cả các sinh viên có id = 1 trong bảng students?
UPDATE students SET age = 20 WHERE id = 1;
UPDATE students SET age = 20;
UPDATE students SET age = 20 WHERE id = 2;
UPDATE students WHERE id = 1 SET age = 20;
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Câu lệnh SQL nào dưới đây được sử dụng để xóa tất cả dữ liệu trong bảng students nhưng không xóa cấu trúc bảng?
DELETE FROM students;
DROP TABLE students;
TRUNCATE TABLE students;
REMOVE FROM students;
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
SQL: DML DDL DCL

Quiz
•
11th - 12th Grade
10 questions
Conexión a DB SQLite I

Quiz
•
11th Grade
15 questions
REST API and MySQL Quiz SKG

Quiz
•
12th Grade
10 questions
BÀI KIỂM TRA 15P HK2 TIN HỌC 11

Quiz
•
11th Grade
15 questions
DBMS_Quiz_1

Quiz
•
University
10 questions
Bài 14: SQL - Ngôn ngữ truy vấn có cấu trúc

Quiz
•
11th Grade
14 questions
SQL 2

Quiz
•
11th Grade
10 questions
Quis Bahasa Pemograman 3

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University