Use replicate (repeat character expression at a specified number of times) function
The replicate function repeats a character expression at a specified number of times.
Grammar:
REPLICATE (character_expression,integer_expression)
Parameter description:
character_expression: An alphanumeric expression consisting of character data.
Integer_expression: A positive integer that specifies the number of repetitions, and returns an empty string if the argument is negative.
Example:
Use the Replicace function to repeat the specified data two times output. The results of the program run are shown in Figure 1.
Figure 1 Repeat the specified data two times output
The SQL statement is as follows:
Use Sales Management system
SELECT REPLICATE (operator name, 2) as duplicate output
From Operator Information table
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.