

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to repeat the values stored in a data column of MySQL table?
For repeating the values stored in a data column of MySQL table, the name of the column must be passed as the first argument of REPEAT() function. The data from ‘Student’ table is used to demonstrate it:
Example
mysql> Select REPEAT(Name,3)AS Name from student; +-----------------------+ | Name | +-----------------------+ | GauravGauravGaurav | | AaravAaravAarav | | HarshitHarshitHarshit | | GauravGauravGaurav | | YashrajYashrajYashraj | +-----------------------+ 5 rows in set (0.00 sec)
- Related Questions & Answers
- How to repeat column values in R data frame by values in another column?
- How do I select data from one table only where column values from that table match the column values of another table in MySQL?
- How to write a MySQL stored function that updates the values in a table?
- How to repeat column values of a data.table object in R by number of values in another column?
- How to repeat column values in R matrix by values in another column?
- How can column data values of a table be compared using MySQL STRCMP() function?
- Insert data in a table in MySQL stored procedure?
- How to change the column position of MySQL table without losing column data?
- How to create a column of factorial values in data frames stored in R list?
- How to create a column of rounded values in data frames stored in R list?
- How to create a column of absolute values in data frames stored in R list?
- Where is the MySQL table data stored in Windows?
- How to write a MySQL stored function that inserts values in a table?
- How to alter the data type of a MySQL table’s column?
- How can we get some last number of characters from the data stored in a MySQL table’s column?
Advertisements