免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5299 | 回复: 4
打印 上一主题 下一主题

Sybase ASE中,为什么不能使用select top n.....? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-12 23:47 |只看该作者 |倒序浏览
Sybase ASE中,为什么不能使用select top n....?如何才能实现这个功能。
还有请问一下,ASE中不能执行select convert(varchar,getdate(),120),我是想把日期转换成yyyy-mm-dd hh:mi:ss这个格式。

论坛徽章:
0
2 [报告]
发表于 2005-04-13 00:55 |只看该作者

Sybase ASE中,为什么不能使用select top n.....?

  12.5.3以后的版本才支持select top n 语法

论坛徽章:
0
3 [报告]
发表于 2005-04-13 08:59 |只看该作者

Sybase ASE中,为什么不能使用select top n.....?

我们使用的是12.5.2版本,他以下版本不能实现以下功能

1>; select convert(char(20),getdate(),16)
2>; go

--------------------
Apr 13 2005 08:55:59

论坛徽章:
0
4 [报告]
发表于 2005-04-13 09:07 |只看该作者

Sybase ASE中,为什么不能使用select top n.....?

如何使用convert转换日期格式为yyyy-mm-dd hh:mi:ss

论坛徽章:
0
5 [报告]
发表于 2005-04-14 23:30 |只看该作者

Sybase ASE中,为什么不能使用select top n.....?

1. set rowcount n
2. select @ddd=getdate()
   select  year(@ddd)+'-'+month(@ddd)+'-'+day(@ddd)+' '+convert(char,@ddd,10
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP