MySql-Mysql技术内幕~SQL编程学习笔记(N)
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)的更多相关文章
- MySql-Mysql技术内幕~SQL编程学习笔记(1)
1.MySQL的历史,一些相关概念. 2.MySQL数据类型 *通常一个页内可以存放尽可能多的行,那么数据库的性能就越好,选择一个正确的数据类型至关重要. 1>UNSIGNED类型: 将数字类型 ...
- 《MySQL技术内幕——SQL编程》读书笔记(二)——数据类型
对数据类型的选择将影响与数据库交互的应用程序的性能. 1.通常来说,如果一个页内可以存放尽可能多的行,那么数据库的性能就越好,因此选择一个正确的数据类型至关重要. 2.另一方面,如果在数据库中创建表时 ...
- postgreSQL PL/SQL编程学习笔记(六)——杂七杂八
1 PL/pgSQL Under the Hood This part discusses some implementation details that are frequently import ...
- postgreSQL PL/SQL编程学习笔记(三)——游标(Cursors)
Cursors Rather than executing a whole query at once, it is possible to set up a cursor that encapsul ...
- postgreSQL PL/SQL编程学习笔记(二)
Control Structures of PL/SQL Control structures are probably the most useful (and important) part of ...
- postgreSQL PL/SQL编程学习笔记(一)
1.Structure of PL/pgSQL The structure of PL/pgSQL is like below: [ <<label>> ] [ DECLARE ...
- postgreSQL PL/SQL编程学习笔记(五)——触发器(Triggers)
Trigger Procedures PL/pgSQL can be used to define trigger procedures on data changes or database eve ...
- postgreSQL PL/SQL编程学习笔记(四)
Errors and Messages 1. Reporting Errors and Messages Use the RAISE statement to report messages and ...
- MySQL基础之事务编程学习笔记
MySQL基础之事务编程学习笔记 在学习<MySQL技术内幕:SQL编程>一书,并做了笔记.本博客内容是自己学了<MySQL技术内幕:SQL编程>事务编程一章之后,根据自己的理 ...
随机推荐
- 【UOJ#394】[NOI2018] 冒泡排序
题目链接 题意 求有多少个字典序严格大于给定排列 \(q_i\) 的排列满足其逆序对数(冒泡排序需要交换的次数)达到下限 \(\frac{1}{2}\sum_{i=1}^n |i-p_i|\) Sol ...
- 一个不错的vue项目
项目演示: https://www.xiaohuochai.cc 项目地址:https://github.com/littlematch0123/blog-client
- 【leetcode】1228.Missing Number In Arithmetic Progression
题目如下: 解题思路:题目很简单.先对数组排序,根据最大值和最小值即可求出公差,然后遍历数组,计算相邻元素的差,如果差不等于公差,即表示数字缺失. 代码如下: class Solution(objec ...
- 【leetcode】1202. Smallest String With Swaps
题目如下: You are given a string s, and an array of pairs of indices in the string pairs where pairs[i] ...
- 简单配置prometheus
一,物理节点安装配置(简单配置,未涉及报警及grafana图形展示) 1,prometheus 官网下载安装 下载安装 # pwd /usr/local/src https://github.com/ ...
- 原生JS获取li中的内容
- vue中下载excel的使用,后端链接两种情况,一个是链接,一个是文件流
vue中下载excel使用 一.这是第一种情况,后台链接地址返回的是一个url,这个时候我只要在导出按钮上绑定exportData()这个事件方法就好了 exportData() { this ...
- mysql中查看ef或efcore生成的sql语句
http://www.solves.com.cn/it/sjk/MYSQL/2019-07-01/1336.html 涉及命令 1.开启general log模式 MySQL>set globa ...
- libusb开发者指南
本文档描述libusb的API,以及如何开发USB应用.1 介绍 1.1 概览本文档描述libusb-0.1的API和USB相关内容.1.2 当前OS支持Linux 2.2或以上FreeBSD/N ...
- tp3.2 页面Windows正常 linux异常,页面找不到
这个问题主要是tp3.2 在读取控制器里的方法时,会把方法自动转为小写, 然后去对应view成找html文件,自然找不到. class textController extends ComContro ...