W3Schools SQL Quiz
W3Schools SQL Quiz
| SQL QUIZ | Points: 25 out of 25 |
|---|
1. What does SQL stand for?
You answered:
Structured Query Language
Correct Answer!
2. Which SQL statement is used to extract data from a database?
You answered:
SELECT
Correct Answer!
3. Which SQL statement is used to update data in a database?
You answered:
UPDATE
Correct Answer!
4. Which SQL statement is used to delete data from a database?
You answered:
DELETE
Correct Answer!
5. Which SQL statement is used to insert new data in a database?
You answered:
INSERT INTO
Correct Answer!
6. With SQL, how do you select a column named "FirstName" from a table named "Persons"?
You answered:
SELECT FirstName FROM Persons
Correct Answer!
7. With SQL, how do you select all the columns from a table named "Persons"?
You answered:
SELECT * FROM Persons
Correct Answer!
8. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?
You answered:
SELECT * FROM Persons WHERE FirstName='Peter'
Correct Answer!
9. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
You answered:
SELECT * FROM Persons WHERE FirstName LIKE 'a%'
Correct Answer!
10. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true
You answered:
True
Correct Answer!
11. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
You answered:
SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
Correct Answer!
12. With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
You answered:
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'
Correct Answer!
13. Which SQL statement is used to return only different values?
You answered:
SELECT DISTINCT
Correct Answer!
14. Which SQL keyword is used to sort the result-set?
You answered:
ORDER BY
Correct Answer!
15. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
You answered:
SELECT * FROM Persons ORDER BY FirstName DESC
Correct Answer!
16. With SQL, how can you insert a new record into the "Persons" table?
You answered:
INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
Correct Answer!
17. With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?
You answered:
INSERT INTO Persons (LastName) VALUES ('Olsen')
Correct Answer!
18. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
You answered:
UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
Correct Answer!
19. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
You answered:
DELETE FROM Persons WHERE FirstName = 'Peter'
Correct Answer!
20. With SQL, how can you return the number of records in the "Persons" table?
You answered:
SELECT COUNT(*) FROM Persons
Correct Answer!
21. What is the most common type of join?
You answered:
INNER JOIN
Correct Answer!
22. Which operator is used to select values within a range?
You answered:
BETWEEN
Correct Answer!
23. The NOT NULL constraint enforces a column to not accept null values.
You answered:
True
Correct Answer!
24. Which operator is used to search for a specified pattern in a column?
You answered:
LIKE
Correct Answer!
25. Which SQL statement is used to create a table in a database?
You answered:
CREATE TABLE
Correct Answer!
W3Schools SQL Quiz的更多相关文章
- W3Schools Quizzes
W3Schools Quizzes Test your skills https://www.w3schools.com/quiztest/default.asp Quiz HOME Quiz HTM ...
- 如何成为QTP专家
关键字:QTP 自动化测试 专家地址:http://www.cnblogs.com/txw1958/archive/2012/11/20/how-to-become-qtp-guru.html Wou ...
- SQL Quick Reference From W3Schools
SQL Statement Syntax AND / OR SELECT column_name(s)FROM table_nameWHERE conditionAND|OR condition AL ...
- SQL指南-SELECT语句
SELECT 语句 SELECT 语句用于从表中筛选数据.列表结果存储于一个结果表中(称作result-set) 语法 SELECT column_name(s)FROM table_name 注意: ...
- SQL基础语法笔记教程整理
PS:本文适用SQL Server2008语法. 一.关系型数据库和SQL 实际上准确的讲,SQL是一门语言,而不是一个数据库. 什么是SQL呢?简而言之,SQL就是维护和使用关系型数据库中的的数据的 ...
- SQL语法的重要知识点总结
好几年没写SQL语句了.现在到了新的team,需要用到数据库.作为QA的话时常需要使用客户端工具连接到数据库中找寻或修改数据.这么长时间没使用,一些SQL的使用技巧都忘得差不多了.晚上看了一些资料,花 ...
- [IT学习]sql 入门及实例
sql 是一种数据库查询语言,可以让你很快的查询到数据.其实一般情况下,你也可以采用excel来查询数据库数据. 但是人们通常认为sql会更加灵活和方便一些. sql学习的入门网站: http://w ...
- SQL语句 & 查询表结构
[group by] 对结果集进行分组,常与汇总函数一起使用. SELECT column,SUM(column) FROM table GROUP BY column HAVING 通常与 GROU ...
- oracle 常用SQL语法手册
Select 用途: 从指定表中取出指定的列的数据 语法: SELECT column_name(s) FROM table_name 解释: 从数据库中选取资料列,并允许从一或多个资料表中,选取一或 ...
随机推荐
- Entity FrameWork 配置 之连接字符串隐藏或重用
C/S项目中使用EF,默认回生成app.config文件夹,软件打包安装成功之后就回生成一个对应exe.config.里面会包含配置的一些信息. 这里介绍给大家一种隐藏连接字符串的方式. 代码如下: ...
- JavaWeb请求中文乱码
解决中文乱麻问题,页面端发出的数据作两次encodeURI var name="张三"; encodeURI(encodeURI(name)); 后台解码: URLDecoder. ...
- Saltstack 命令行:批量发送命令,返回执行结果
批量发送发送命令符,并返回结果. salt '*' cmd.run 'df -h' ---------------------------------------- Stest1: Filesyste ...
- linux中的信号简介和trap命令
1.信号 linux通过信号来在运行在系统上的进程之间通信,也可以通过信号来控制shell脚本的运行 主要有一下信号 1 ##进程重新加载配置 2 ##删除进程在内存中的数据 3 ##删除鼠标在内存中 ...
- zabbix监控nginx的性能
1.nginx配置 需要使用zabbix监控nginx,首先nginx需要配置ngx_status,在nginx的配置文件中加入红框中的配置,然后重启nginx如下图所示: location /ngx ...
- Java_Chapter6_类与对象
6.1 类与对象的概念 6.2 定义类 class Cylinder { double radius; int height; double pi; void setCylinder(double r ...
- v4l2中的多流机制
一直在搞camera,对v4l2也比较熟悉了,今天写文章说点自己的看法 对于v4l2,对多流的支持是比较弱的,只是一个流.但现在的camera 硬件,能支持多个流同事工作,所以又必要对v4l2的api ...
- scjp考试准备 - 11 - 类型转换2
题目如下: interface Foo{} class Alpha implements Foo{} class Beta extends Alpha{} public class Delta ext ...
- python基础8 - 变量2
1. 变量的引用 变量 和 数据 都是保存在 内存 中的 在 Python 中 函数 的 参数传递 以及 返回值 都是靠 引用 传递的 1.1 引用的概念 在 Python 中 变量 和 数据 是分开 ...
- 框架布局FrameLayout
框架布局FrameLayout 一.简介 二.代码实例 结果图: 代码: 需要注意的代码: imageView_play.setVisibility(View.INVISIBLE); <Fram ...