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

Realizing the method of generating Random number and concatenating string by MySQL

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

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the method of generating random numbers and concatenating strings in MySQL, which has a certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

The methods used are:

Concat ('a connection string'); connection string

Rand (); generate random numbers

Floor (); take an integer

Example of SQL statement

UPDATE user set reg_ip= concat (floor (RAND () * 250),'.', floor (RAND () * 250) where username='xxx' thank you for reading this article carefully. I hope the editor will share the method of realizing MySQL to generate random numbers and concatenate strings, which will be helpful to everyone. At the same time, I also hope that you will support it. Pay attention to the industry information channel, find problems, detailed solutions are waiting for you to learn!

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

Wechat

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

12
Report