mysql - How to divide a table with specific number of rows (and rearrange it) on SQL? -


i'm newest newbie database , learning use mysql.
want cut data every 10 row, , paste new columns.
function of "partition" seems available in these situation, can't figure out how works.
want know way convenient cut , paste in excel..

(please take @ pictures : http://doremifafa.egloos.com/1147359)

data revise:

http://pds27.egloos.com/pds/201310/07/05/f0238705_525261715c61b.png

i want this:

http://thumbnail.egloos.net/600x0/http://pds21.egloos.com/pds/201310/07/05/f0238705_5252617b8c1f4.png

when @ picture, seems want reverse, is, take values different columns , 'paste' these underneath each other create lot of rows , 2 columns. right?

if so, (using dummy col1, 2, 3 fields since don't know actual column , table names).

select    col1, col2, col3     yourtable  union select    col4, col5, col6     yourtable  union select    col7, col8, col9     yourtable  ... 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -