1、_rowid

类似Oracle的rowid

mysql> select _rowid rowid,t.* from city t limit ;
+-------+----+----------------+-------------+---------------+------------+
| rowid | ID | Name | CountryCode | District | Population |
+-------+----+----------------+-------------+---------------+------------+
| | | Kabul | AFG | Kabol | |
| | | Qandahar | AFG | Qandahar | |
| | | Herat | AFG | Herat | |
| | | Mazar-e-Sharif | AFG | Balkh | |
| | | Amsterdam | NLD | Noord-Holland | |
| | | Rotterdam | NLD | Zuid-Holland | |
| | | Haag | NLD | Zuid-Holland | |
| | | Utrecht | NLD | Utrecht | |
| | | Eindhoven | NLD | Noord-Brabant | |
| | | Tilburg | NLD | Noord-Brabant | |
+-------+----+----------------+-------------+---------------+------------+
rows in set (0.00 sec) mysql>

2、查看表结构

mysql> show create table t\G;
*************************** . row ***************************
Table: t
Create Table: CREATE TABLE `t` (
`a` int() unsigned DEFAULT NULL,
`b` int() unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
row in set (0.00 sec) ERROR:
No query specified mysql> desc t;
+-------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| a | int() unsigned | YES | | NULL | |
| b | int() unsigned | YES | | NULL | |
+-------+------------------+------+-----+---------+-------+
rows in set (0.00 sec) mysql>

3、hex函数

4、SQL_MODE:SQL模式

5、MySQL中的函数

1》cast:强制转换

2》

MySql-Mysql技术内幕~SQL编程学习笔记(N)的更多相关文章

  1. MySql-Mysql技术内幕~SQL编程学习笔记(1)

    1.MySQL的历史,一些相关概念. 2.MySQL数据类型 *通常一个页内可以存放尽可能多的行,那么数据库的性能就越好,选择一个正确的数据类型至关重要. 1>UNSIGNED类型: 将数字类型 ...

  2. 《MySQL技术内幕——SQL编程》读书笔记(二)——数据类型

    对数据类型的选择将影响与数据库交互的应用程序的性能. 1.通常来说,如果一个页内可以存放尽可能多的行,那么数据库的性能就越好,因此选择一个正确的数据类型至关重要. 2.另一方面,如果在数据库中创建表时 ...

  3. postgreSQL PL/SQL编程学习笔记(六)——杂七杂八

    1 PL/pgSQL Under the Hood This part discusses some implementation details that are frequently import ...

  4. postgreSQL PL/SQL编程学习笔记(三)——游标(Cursors)

    Cursors Rather than executing a whole query at once, it is possible to set up a cursor that encapsul ...

  5. postgreSQL PL/SQL编程学习笔记(二)

    Control Structures of PL/SQL Control structures are probably the most useful (and important) part of ...

  6. postgreSQL PL/SQL编程学习笔记(一)

    1.Structure of PL/pgSQL The structure of PL/pgSQL is like below: [ <<label>> ] [ DECLARE ...

  7. postgreSQL PL/SQL编程学习笔记(五)——触发器(Triggers)

    Trigger Procedures PL/pgSQL can be used to define trigger procedures on data changes or database eve ...

  8. postgreSQL PL/SQL编程学习笔记(四)

    Errors and Messages 1. Reporting Errors and Messages Use the RAISE statement to report messages and ...

  9. MySQL基础之事务编程学习笔记

    MySQL基础之事务编程学习笔记 在学习<MySQL技术内幕:SQL编程>一书,并做了笔记.本博客内容是自己学了<MySQL技术内幕:SQL编程>事务编程一章之后,根据自己的理 ...

随机推荐

  1. VC内联汇编和GCC内联汇编的语法区别

    VC: #include <stdio.h> main(){ int a = 1; int b = 2; int c; __asm{ mov eax,a mov ebx,b mov ecx ...

  2. Hadoop中配置环境后重启失效解决方法

    Ubuntu下设置环境变量有三种方法,一种用于当前终端,一种用于当前用户,一种用于所有用户: 一:用于当前终端: 在当前终端中输入:export PATH=$PATH:<路径> 不过上面的 ...

  3. UVA-10480-Sabotage(最大流最小割,打印路径)

    链接: https://vjudge.net/problem/UVA-10480 题意: The regime of a small but wealthy dictatorship has been ...

  4. DB2常用指令

    1. 启动实例(db2inst1): db2start 2. 停止实例(db2inst1): db2stop 3. 列出所有实例(db2inst1) db2ilist 3-1.列出当前实例: db2 ...

  5. 扑克牌中的顺子(网易2014.3.16笔试offerP226)

    题目:从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的.2~10为数字本身,A为1,J~K为11,12,13,而大小王可以看成任意数字.(网易要求必须用C完成,可以用C库函数) ja ...

  6. IDEA如何将git下来的是工程转为maven工程

    1.在工程名称上右击并点击[Add Framework Support] 2.在打开的[Add Framework Support]窗口中在左侧栏找到[Maven]选项并勾上并点击[OK]按钮.

  7. ps -aux显示信息COMMAND不全

    ps -aux结果: ps -auxwww结果:

  8. MongoClient类

    在2.10.0版本中引入了MongoClient类,同时在其API中也说明了Mongo类会在将来的版本中被MongoClient替换(Note: This class has been superse ...

  9. SpringBoot2.2发行版新特性

    Spring Framework升级 SpringBoot2.2的底层Spring Framework版本升级为5.2. JMX默认禁用 默认情况下不再启用JMX. 可以使用配置属性spring.jm ...

  10. JMS学习十一(ActiveMQ Consumer高级特性之独有消费者(Exclusive Consumer))

    一.简介 Queue中的消息是按照顺序被分发到consumers的.然而,当你有多个consumers同时从相同的queue中提取消息时, 你将失去这个保证.因为这些消息是被多个线程并发的处理.有的时 ...