-2

Having trouble concat this code in mysql server any ideas?

DECLARE @letters TABLE(letter VARCHAR(3))

INSERT INTO @letters VALUES('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('J'),('K') ,('L'),('M'),('N'),('O'),('P'),('Q'),('R'),('S'),('T'),('U'),('V') ,('W'),('X'),('Y'),('Z')

Amped
  • 1
  • 1

1 Answers1

0

Try my suggestion

DECLARE @letters tableName (columnName)

INSERT INTO @letters
VALUES ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('J'),('K'),
        ('L'),('M'),('N'),('O'),('P'),('Q'),('R'),('S'),('T'),('U'),('V'),
        ('W'),('X'),('Y'),('Z');
Mohd Dhiyaulhaq
  • 89
  • 1
  • 14
  • Okay thanks now my only problem is how can i concat 3 random letter in 1 row here's my code. Missing is the concat. INFO: -queue_length is how many data will show -@letter is my table `SELECT TOP (@queue_length)* FROM @letters ORDER BY NEWID()` – Amped Jun 25 '14 at 03:00
  • maybe this is what you want [random row](http://stackoverflow.com/questions/4329396/mysql-select-10-random-rows-from-600k-rows-fast) – Mohd Dhiyaulhaq Jun 25 '14 at 03:16