Thursday, October 21, 2010

Oracle SQL : How to SELECT with LIMIT and OFFSET

This is how it can be done. ( Choose either of these ) should be working ....
 
SELECT * FROM (
            SELECT TKN.*,
                   RANK() OVER (ORDER BY negeri DESC , ROWNUM ASC ) NAMAROWGMI 
            FROM TKNEGERI TKN )
    WHERE NAMAROWGMI >0 AND NAMAROWGMI < 5;
    
    
    
  SELECT * FROM (
            SELECT TKN.*,
                   RANK() OVER (ORDER BY negeri DESC , ROWNUM ASC ) NAMAROWGMI 
            FROM TKNEGERI TKN )
    WHERE NAMAROWGMI >5 AND NAMAROWGMI < 10;   
    

    
  SELECT * FROM (
            SELECT TKN.*,
                   RANK() OVER (ORDER BY negeri DESC , ROWNUM ASC ) NAMAROWGMI 
            FROM TKNEGERI TKN )
    WHERE NAMAROWGMI BETWEEN 5 AND 10;   

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...