/*----------------------------------Bulk generation of random string----------------------------------*/--If the stored procedure is getrandstr in a known database, it is deleted (to facilitate repeated execution of this code)if exists (SELECT *
See a post in the forum, the post has some SQL aspects of the question, I think these questions are very representative.The connection of the original posts is: http://bbs.csdn.net/topics/390884161?page=1#post-398177057Here is my solution, for your
in the The dbms_random package in Oracle encapsulates a number of functions that generate random numbers and random strings, which are commonly used in the following two:Dbms_random. VALUE function This function is used to produce a random number
SQL generates n-bit random strings and SQL generates n
-- 1. Use newid () go -- to create a view (because newid () cannot be directly used in the function) create view vnewid as select newid () N 'macoid '; go -- create function getrandstr (@ n int)
How to insert random string data in mysql, mysql string
Application scenarios:Sometimes it is necessary to test the records inserted into the database, so these scripts are very necessary.
Create a table:
CREATE TABLE `tables_a` ( `id` int(10) NOT
Sys_guid (): Sys_guid () is a function provided after Oracle 8i. Sys_guid generates and returns a globally unique identifier (the original value) consisting of 16 bytes. More suitable for multiple database data integration use (---from Baidu
Oracle enables fast batch generation of random numeric strings:--TableCreate Tablerandom_number_temp (row_num Number default 0 not NULL, Random_numVARCHAR2( -) not NULL )--typeType number_array_t is Table of Number Index
Using system;Using system. Collections. Generic;Using system. Text. regularexpressions;Using system. text;
Namespace insapp. Word{/// /// String createrandomcode (INT codecount) generates random numbers and letters Based on the length/// Bool
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.