Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the virtual column of mysql 5.7rowid

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to understand the virtual column of mysql 5.7A _ rowid. For this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Check the official material 13 SQL Statement Syntax13.1 Data Definition Statements13.1.14 CREATE INDEX Syntax test examples

Create a test table and insert data

Mysql > create table t_rowid (an int,b int,key (a)); Query OK, 0 rows affected (0.03 sec) mysql > insert into t_rowid select 1 OK 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0mysql > insert into t_rowid select 2 * * query OK, 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0

Show _ rowid

Mysql > select _ rowid from tweets rows in set + | _ rowid | +-+ | 1 | | 2 | +-+ 2 rows in set (0.00 sec) mysql > select _ ROWID from tweets rows in set + | _ ROWID | +-+ | 1 | 2 | +-+ 2 sec)

Show _ rowid and some columns

Mysql > select _ rowid,a from tactile rowidths-1 | 1 | 1 | 2 | 2 | +-+ 2 rows in set (0.00 sec)

Show _ rowid and all columns

Mysql > select _ rowid,a,b from tactile rowidths + | _ rowid | a | b | +-+-- +-+ | 1 | 1 | 1 | 2 | 2 | +-+-- + 2 rows in set (0.00 sec)

Cannot display _ rowid and *

Mysql > select _ rowid,* from tweets widgets and error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near'* from tweets widgets'at line 1mysql >

_ rowid does not apply to the following scenarios:

The data type of a primary key column or a normal column is not a numeric type

The primary key is the federated primary key

The only column is not empty

This is the answer to the question about how to understand mysql 5.7 _ rowid false list. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report