MySQL Keynote
Posted Tekkaman
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL Keynote相关的知识,希望对你有一定的参考价值。
【MySQL Keynote】
1、Keywords may be entered in any lettercase. The following queries are equivalent:
2、Here is another query. It demonstrates that you can use mysql as a simple calculator:
3、所有查询以;结尾。
4、显示数据库。 SHOW DATABASES
does not show databases that you have no privileges
5、If the test
database exists, try to access it:
6、创建数据库。
nder Unix, database names are case sensitive (unlike SQL keywords), so you must always refer to your database as menagerie
, not asMenagerie
, MENAGERIE
, or some other variant.
7、显示tables
8、查看表定义.
9、使用insert插入数据
10、更新数据
11、时间计算
12、取出日期中的月份
13、DATE_ADD可以添加时间。
14、MOD是模运算。
15、LIKE模式匹配. SQL pattern matching enables you to use _
to match any single character and %
to match an arbitrary number of characters (including zero characters).
16、Number of animals per combination of species and sex:
参考:https://dev.mysql.com/doc/refman/5.7/en/entering-queries.html
以上是关于MySQL Keynote的主要内容,如果未能解决你的问题,请参考以下文章