Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¸ösql·ÖÒ³µÄ´æ´¢¹ý³Ì

 CREATE  procedure SqlPager_Ex
 @sqlstr varchar(8000), --²éѯ×Ö·û´®
  @currentpage int, --µÚNÒ³
  @pagesize int --ÿҳÐÐÊý, 
 as
  set nocount on
  declare @P1 int, --P1ÊÇÓαêµÄid
   @rowcount int
  exec sp_cursoropen @P1 output,@sqlstr,@scrollopt=1,@ccopt=1,@rowcount=@rowcount output
  select  ceiling(1.0*@rowcount /@pagesize)  as ×ÜÒ³Êý --,@rowcount as ×ÜÐÐÊý,@currentpage as µ±Ç°Ò³  
  set @currentpage=(@currentpage-1)*@pagesize+1
  exec sp_cursorfetch @P1,16,@currentpage,@pagesize
  exec sp_cursorclose @P1
  set nocount off
GO


Ïà¹ØÎĵµ£º

1.The SQL introuduction

Introducing Oracle Database 11g
List the features of Oracle Database 11g
Discuss the basic design, theoretical and physical aspects of a relational database
Categorize the different types of SQL statements
Describe the data set used by the course
Log onto the database using the SQL Develope ......

±Ø±¸sqlÓï¾ä

 1.¶Á³ö±íÖеÄ×Ö¶ÎÃû
ResultSet  rs = test.selectSql("SELECT * from datainfo");  
java.sql.ResultSetMetaData md=rs.getMetaData();   //¶Á³öÊý¾Ý¿âµÄ×Ö¶ÎÃû
   int nColumn=md.getColumnCount();   //×Ö¶Î×ÜÊý
   for(int i=0;i<nColumn;i++)
& ......

Ô¶³Ì±¸·ÝsqlÊý¾Ý¿âµ½±¾»ú

 Ìõ¼þ£º
    ÓµÓÐsaȨÏÞ
    ¿ªÆô xp_cmdshell
·½·¨£º
 ¿ªÆô/¹Ø±Õ xp_cmdshell ±ØÐëÔÚ master  ¿âÖ´ÐÐ
EXEC sp_configure 'show advanced options', 1 
RECONFIGURE WITH OVERRIDE 
EXEC sp_configure 'xp_cmdshell', 1 
RECONFIGURE ......

SQL Server ÎÞÕʺŻòÍü¼ÇÃÜÂëµÇ½ÎÊÌâ

Question 1£º
Êý¾Ý¿âµÄÑé֤ģʽΪWindowsÑéÖ¤£¬É¾³ýÁËMS SQL ServerÕʺÅBUILTIN\Administrators,µÇ½²»ÉÏSQL Server¹ÜÀíÆ÷£¿
Answer£º
      1.ÖØÐÂÔËÐÐMS SQL SERVERµÄ°²×°³ÌÐò£¬ÔÚ“°²×°Ñ¡ÏçÃæÀïÑ¡Ôñ“¸ß¼¶Ñ¡Ï¬ÏÂÒ»²½ºóÑ¡Ôñ“×¢²á±íÖØ½¨”£¬½ÓÏÂÀ´¸ú° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ