Last active
December 19, 2015 01:39
-
-
Save boy3vil/5877204 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table table_name (col1, col2) | |
select col1 from ( | |
select | |
@rownum:=@rownum+1 number_list, p.* | |
from table_name p, (SELECT @rownum:=0) r | |
order by col1 | |
) as new_col | |
where number_list = 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment