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的更多相关文章

  1. W3Schools Quizzes

    W3Schools Quizzes Test your skills https://www.w3schools.com/quiztest/default.asp Quiz HOME Quiz HTM ...

  2. 如何成为QTP专家

    关键字:QTP 自动化测试 专家地址:http://www.cnblogs.com/txw1958/archive/2012/11/20/how-to-become-qtp-guru.html Wou ...

  3. SQL Quick Reference From W3Schools

    SQL Statement Syntax AND / OR SELECT column_name(s)FROM table_nameWHERE conditionAND|OR condition AL ...

  4. SQL指南-SELECT语句

    SELECT 语句 SELECT 语句用于从表中筛选数据.列表结果存储于一个结果表中(称作result-set) 语法 SELECT column_name(s)FROM table_name 注意: ...

  5. SQL基础语法笔记教程整理

    PS:本文适用SQL Server2008语法. 一.关系型数据库和SQL 实际上准确的讲,SQL是一门语言,而不是一个数据库. 什么是SQL呢?简而言之,SQL就是维护和使用关系型数据库中的的数据的 ...

  6. SQL语法的重要知识点总结

    好几年没写SQL语句了.现在到了新的team,需要用到数据库.作为QA的话时常需要使用客户端工具连接到数据库中找寻或修改数据.这么长时间没使用,一些SQL的使用技巧都忘得差不多了.晚上看了一些资料,花 ...

  7. [IT学习]sql 入门及实例

    sql 是一种数据库查询语言,可以让你很快的查询到数据.其实一般情况下,你也可以采用excel来查询数据库数据. 但是人们通常认为sql会更加灵活和方便一些. sql学习的入门网站: http://w ...

  8. SQL语句 & 查询表结构

    [group by] 对结果集进行分组,常与汇总函数一起使用. SELECT column,SUM(column) FROM table GROUP BY column HAVING 通常与 GROU ...

  9. oracle 常用SQL语法手册

    Select 用途: 从指定表中取出指定的列的数据 语法: SELECT column_name(s) FROM table_name 解释: 从数据库中选取资料列,并允许从一或多个资料表中,选取一或 ...

随机推荐

  1. SpringBoot AOP控制Redis自动缓存和更新

    导入redis的jar包 <!-- redis --> <dependency> <groupId>org.springframework.boot</gro ...

  2. 20145201《Java程序设计》第8周学习总结

    20145201 <Java程序设计>第八周学习总结 教材学习内容总结 第十五章 通用API 15.1 日志 15.1.1 日志API简介 java.util.logging包提供了日志功 ...

  3. COS-4进程及进程管理

    操作系统是用户和计算机的接口,同时也是计算机硬件和其他软件的接口.操作系统的功能包括管理计算机系统的硬件.软件及数据资源,控制程序运行,改善人机界面,为其它应用软件提供支持,让计算机系统所有资源最大限 ...

  4. GRE/GMAT/LSAT长难句300例精讲精练-思维导图

    <GRE/GMAT/LSAT长难句300例精讲精练>是GRE超人气名师陈琦老师团队的又一本新作,也是“再要你命3000”的新成员,从之前的词汇.短语.练习,提升到长难句层面,相信学完本书后 ...

  5. v4l2 下载

    To clone the master development repository, install git, and run: git clone git://github.com/torvald ...

  6. MongoDB快速入门(十二) -- 索引

    MongoDB 索引 索引支持的解析度的查询效率.如果没有索引,MongoDB必须扫描每一个文档的集合,要选择那些文档相匹配的查询语句.这种扫描的效率非常低,会要求 mongod 做大数据量的处理. ...

  7. Nginx Rewrite 规则入门 伪静态规则

    文件及目录匹配: -f 和 !-f 用来判断是否存在文件 -d 和 !-d 用来判断是否存在目录 -e 和 !-e 用来判断是否存在文件或目录 -x 和 !-x 用来判断文件是否可执行 正则表达式匹配 ...

  8. ubuntu 14.04 建立wifi热点

    昨天突然想起来我可以用笔记本搞一个热点这样我的手机就不用上流量了,但是手机死活搜不到建好的信号,目前的解决方案如下: 直接用ubuntu自带的创建wifi网络功能是不好使的,因为android系统不支 ...

  9. Amazon SES介绍 - SES发送邮件的过程

     Amazon SES,  全称Amazon Simple Email Service,即Amazon简单邮件服务,它是Amazon提供的一款供开发人员或公司企业用来处理邮件相关业务的服务,也就是说, ...

  10. js进阶---12-12、jquery事件委托怎么使用

    js进阶---12-12.jquery事件委托怎么使用 一.总结 一句话总结:通过on方法(事件委托),给要绑定事件的元素的祖先绑定事件,从而达到效果. 1.事件委托是什么? 通过事件冒泡,让子元素绑 ...