当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 谢谢 ......
    摘要: 这个问题应该是两步, 第一,怎么获得当前时间的时间戳,时间戳是个什么类型变量? 第二,怎么把这个时间戳,变成字符串 请高手指点..... ......


一个简单的存储过程问题

create   proc   SelectRcd  
              @count       int  
  as  
              select   top   @count   *   from   TableA  
  go  
  提示@count附近出错  
   
  如果   select   10   *   from   TableA是没有问题的  
   
  ps:我想使用存储过程来实现其他的功能,sql语句不是很方便  
   
  希望大牛s指点指点!感激ing~~~  
   
 

NO.1   作者: gmlxf

create   proc   SelectRcd  
              @count       int  
  as  
              exec(select   top     +   @count   +     *   from   pubs..authors)  
  go  
   
   
  exec   SelectRcd   10

NO.2   作者: ADWARDS00

create   proc   SelectRcd  
              @count       int  
  as  
              exec(select   top   +@count+   *   from   TableA)  
  go  
 

NO.3   作者: hglhyy

create   proc   SelectRcd  
              @count       int  
  as  
              exec(select   top   +@count+   *   from   TableA)  
  go  
   
   
  exec   SelectRcd    
   
  同意上楼,楼上的!

NO.4   作者: Rotaxe

create   proc   SelectRcd  
              @count       int  
  as  
  declare   @s   varchar(1000)  
  @s=select   top     +   cast(@count   as   varchar(10))   +     *   from   pubs..authors  
              exec(@s)  
  go  
 


    摘要: 使用oledb更新数据库后,在发出查询数据没有变化,只有过一段时间后在查询才能得到更新后的数据? 有无办法解决? (更新是成功的) ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE