锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲精品影视,亚洲色偷偷色噜噜狠狠99,亚洲黄色在线电影http://www.tkk7.com/joessy/category/411.html璁板綍宸ヤ綔涓亣鍒扮殑闂鍙婅В鍐沖姙娉?/description>zh-cnFri, 02 Mar 2007 03:32:04 GMTFri, 02 Mar 2007 03:32:04 GMT60ORACLE涓敤rownum鍒嗛〉騫舵帓搴忕殑SQL璇彞http://www.tkk7.com/joessy/articles/1398.html宸ヤ綔鏃ュ織宸ヤ綔鏃ュ織Mon, 21 Feb 2005 09:15:00 GMThttp://www.tkk7.com/joessy/articles/1398.htmlhttp://www.tkk7.com/joessy/comments/1398.htmlhttp://www.tkk7.com/joessy/articles/1398.html#Feedback2http://www.tkk7.com/joessy/comments/commentRss/1398.htmlhttp://www.tkk7.com/joessy/services/trackbacks/1398.html

浠ュ墠鍒嗛〉涔犳儻鐢ㄨ繖鏍風殑SQL璇彞:

select * from

(select t.*,rownum row_num from mytable t order by t.id) b

where b.row_num between 1 and 10

緇撴灉鍙戠幇鐢變簬璇ヨ鍙ヤ細鍏堢敓鎴恟ownum 鍚庢墽琛宱rder by 瀛愬彞,鍥犺屾帓搴忕粨鏋滄牴鏈笉瀵?鍚庢潵鍦℅OOGLE涓婃悳鍒?A target=blank>涓綃囨枃绔?/FONT>,鍘熸潵澶氬涓灞俿elect 灝辮兘寰堝ソ鐨勮В鍐寵闂,鐗規璁板綍,璇彞濡備笅:

select * from

(select a.*,rownum row_num from

(select * from mytable t order by t.id desc) a

) b where b.row_num between 1 and 10



]]>
鍏充簬BMP鐨勫垎欏墊樉紺?ORACLE)http://www.tkk7.com/joessy/articles/1031.html宸ヤ綔鏃ュ織宸ヤ綔鏃ュ織Fri, 04 Feb 2005 09:57:00 GMThttp://www.tkk7.com/joessy/articles/1031.htmlhttp://www.tkk7.com/joessy/comments/1031.htmlhttp://www.tkk7.com/joessy/articles/1031.html#Feedback0http://www.tkk7.com/joessy/comments/commentRss/1031.htmlhttp://www.tkk7.com/joessy/services/trackbacks/1031.html鐢變簬鏈榪戞帴鎵嬬殑欏圭洰涓ぇ閲忕敤鍒癊JB1.0鐨凚MP錛屾暟鎹噺榪囧ぇ鐨勬椂鍊欏氨涓嶅緱涓嶉噰鍙栧垎欏墊樉紺虹殑瑙e喅鏂規硶銆傜敱浜庡BMP浜嗚В騫朵笉澶箙錛屼笅闈㈡垜閲囩敤鐨勬柟娉曪紝鐢變簬涓嶅緱涓嶄負姣忎釜瑕佸垎欏電殑BMP鍔犱袱涓柟娉曟劅瑙変篃鏄潈鐩婁箣璁★紝涓嶇煡閬撴槸鍚︽湁鏇村ソ鐨勬柟娉曞垎欏碉紝浠呭綋鎶涚爾寮曠帀鍚с?/P>

1錛屽湪榪滅▼Home鎺ュ彛涓姞涓嬮潰涓や釜鏂規硶:

public interface MyTableHome extends EJBHome
{
    
//
    public Collection findByPage(String strCond,int rownumbegin,int rownumend) throws RemoteException, FinderException;
    
public int getCount(String strCond) throws RemoteException;
}

2錛屽湪BMP涓篃鍔犵浉搴旂殑鏂規硶:

public class MyTableBeanBMP extends MyTableBean
{
    
//
    public Collection ejbFindByPage(String strCond,int rownumbegin,int rownumend) 
    
{
        Connection connection 
= null;
        PreparedStatement statement 
= null;
        
try 
        
{
            connection 
= dataSource.getConnection();
            statement 
= connection.prepareStatement("SELECT  ID from (select t.*, rownum  row_num from MYTABLE t "+strCond+") a  where a.row_num between "+rownumbegin+" and "+rownumend+"");
            ResultSet resultSet 
= statement.executeQuery();
            Vector keys 
= new Vector();
            
while (resultSet.next()) 
            
{
                String cCode 
= resultSet.getString(1);
                keys.addElement(cCode);
            }

            
return keys;
        }

        
catch(SQLException e) 
        
{
            
throw new EJBException("Error executing SQL SELECT  ID from (select t.*, rownum  row_num from MYTABLE t "+strCond+") a  where a.row_num between "+rownumbegin+" and "+rownumend+" : " + e.toString());
        }

        
finally 
        
{
            closeConnection(connection, statement);
        }

    }

    
public int ejbHomeGetCount(String strCond) 
    
{
        Connection connection 
= null;
        PreparedStatement statement 
= null;

        
try 
        
{
            connection 
= dataSource.getConnection();
            statement 
= connection.prepareStatement("SELECT count(*) from MYTABLE "+strCond);
            ResultSet resultSet 
= statement.executeQuery();
            
int count = 1;
            
while (resultSet.next()) 
            
{
                count 
= resultSet.getInt(1);
            }

            
return count;
        }

        
catch(SQLException e) 
        
{
            
throw new EJBException("Error executing SELECT count(*) from MYTABLE "+strCond+" : " + e.toString());
        }

        
finally 
        
{
            closeConnection(connection, statement);
        }

    }

}

3.璋冪敤:

int maxrowinpage = 15;//姣忛〉鏄劇ず15鏉¤褰?/SPAN>
int Page = 1;
int rowcount = 0
int maxpage = 0
int rownumbegin =1
int rownumend =maxrowinpage; 
String strCond 
=" "//鏌ヨ鏉′歡



Context context 
= new InitialContext(); 
Object 
ref = context.lookup("MyTable"); 
MyTableHome home 
= (MyTableHome) ref
rowcount 
= home.getCount(strCond); 
maxpage 
= (rowcount + maxrowinpage - 1/ maxrowinpage; 
rownumbegin 
= (Page-1)*maxrowinpage+1
rownumend 
= Page*maxrowinpage; 
Collection c 
= home.findByPage(strCond,rownumbegin,rownumend); 



 



]]>
主站蜘蛛池模板: 国产成人亚洲精品影院| 四虎永久在线精品视频免费观看| 中文字幕在线亚洲精品| 一进一出60分钟免费视频| 亚洲国产日韩成人综合天堂| 菠萝菠萝蜜在线免费视频| 亚洲午夜成人精品电影在线观看| 成人国产网站v片免费观看| 亚洲欧洲久久久精品| 91免费福利视频| 婷婷亚洲综合五月天小说| 麻豆高清免费国产一区| 亚洲区精品久久一区二区三区| 黄页网站在线看免费| 亚洲人成网站在线播放2019| 免费人成年轻人电影| 黄视频在线观看免费| 亚洲丝袜美腿视频| 国产免费丝袜调教视频| 亚洲精品中文字幕无码A片老| 免费v片视频在线观看视频| 老司机精品免费视频| 亚洲综合图片小说区热久久| 午夜影视在线免费观看| 国产免费高清69式视频在线观看| 亚洲av无码成人黄网站在线观看 | 久久久久久国产a免费观看不卡| 亚洲色精品88色婷婷七月丁香| 99热在线免费播放| 亚洲色欲色欱wwW在线| 中文字幕日韩亚洲| 久草在视频免费福利| 又硬又粗又长又爽免费看| 亚洲一级二级三级不卡| 美女被免费视频网站a国产| 好猛好深好爽好硬免费视频| 亚洲人和日本人jizz| jlzzjlzz亚洲乱熟在线播放| 99精品一区二区免费视频| 久久亚洲中文无码咪咪爱| 亚洲国产精品无码中文字|