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 解释: 从数据库中选取资料列,并允许从一或多个资料表中,选取一或 ...
随机推荐
- 菩提树下的杨过.Net 的《hadoop 2.6全分布安装》补充版
对菩提树下的杨过.Net的这篇博客<hadoop 2.6全分布安装>,我真是佩服的五体投地,我第一次见过教程能写的这么言简意赅,但是又能比较准确表述每一步做法的,这篇博客主要就是在他的基础 ...
- CMSIS_OS中osMailPut 和 osMessagePut 的问题
1. 背景 为了屏蔽不同OS之间的差别,ARM公司开发了一套OS接口--CMSIS_OS. 在使用STM32 cube生成的free rtos工程中,遇到一些问题. 问题1:osMessageGet ...
- Cookie应用参考
内容来自imooc.
- 理解 $nextTick 的作用
有同学在看 Vue 官方文档时,对 API 文档中的 Vue.nextTick 和 vm.$nextTick 的作用不太理解. 其实如果看一下深入响应式原理 - vue.js中的有关内容,可能会有所理 ...
- 20145222黄亚奇《网络对抗》 逆向及BOF进阶实践学习总结
20145222<网络对抗> 逆向及BOF进阶实践学习总结 实践目的 1.注入shellcode 2.实现Return-to-libc攻击 知识点学习总结 Shellcode实际是一段代码 ...
- QT添加资源文件,并为工具栏添加图片
1.右键工程,添加新文件,QT,QT Resource File. 2.选择res,添加前缀,添加文件,(把图片放在文件夹里,把文件夹放在工程目录下)选择图片 3.在ui中,下方有个Action Ed ...
- 求最长不下降子序列(nlogn)
最长递增子序列问题:在一列数中寻找一些数,这些数满足:任意两个数a[i]和a[j],若i<j,必有a[i]<a[j],这样最长的子序列称为最长递增子序列. 设dp[i]表示以i为结尾的最长 ...
- java中string与byte[]之间的转化分析
背景:最近接触zookeeper的java开发,由于zookeeper中传的好像都是byte[]的数据(需要进一步确认),好多情况下都需要进行转换. 1)和zookeeper原生API不同,通过zkc ...
- 使用nagios检测windows服务器
1.安装nagios windows客户端 下载NSClient++的安装包,注意根据实际的32/64CPU来下载 下载地址 http://sourceforge.net/projects/nscpl ...
- C语言排序算法之简单交换法排序,直接选择排序,冒泡排序
C语言排序算法之简单交换法排序,直接选择排序,冒泡排序,最近考试要用到,网上也有很多例子,我觉得还是自己写的看得懂一些. 简单交换法排序 /*简单交换法排序 根据序列中两个记录键值的比较结果来对换这两 ...