LINUX FTP安装与配置
2014-03-12 11:04
375 查看
<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog01.html" frameborder="0" width="728" scrolling="no" height="90"></iframe>
/**==** 2. 随机排序中的newid()问题 **==**/
--测试数据
declare @t table(name char(1),value int)
insert into @t
select 'a',1
union all select 'a',2
union all select 'b',3
union all select 'b',4
union all select 'c',5
union all select 'c',6
--要求,随机排序,但name相同的要排在一齐
select a.*
from @t a join(
select aa=newid(),name from(select distinct name from @t) a
) b on a.name=b.name
order by b.aa,newid()
/*--测试结果之一,并没有达到要求.如果将join改成left right full join,就正确
name value
---- -----------
b 4
b 3
c 5
a 1
a 2
c 6
(所影响的行数为 6 行)
--*/
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=55108
/**==** 2. 随机排序中的newid()问题 **==**/
--测试数据
declare @t table(name char(1),value int)
insert into @t
select 'a',1
union all select 'a',2
union all select 'b',3
union all select 'b',4
union all select 'c',5
union all select 'c',6
--要求,随机排序,但name相同的要排在一齐
select a.*
from @t a join(
select aa=newid(),name from(select distinct name from @t) a
) b on a.name=b.name
order by b.aa,newid()
/*--测试结果之一,并没有达到要求.如果将join改成left right full join,就正确
name value
---- -----------
b 4
b 3
c 5
a 1
a 2
c 6
(所影响的行数为 6 行)
--*/
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=55108
相关文章推荐
- 阿里云Linux服务器安装配置ftp及上传网站全教程
- Windows下虚拟机Linux FTP的安装配置与使用
- Linux FTP的安装与配置
- linux下ftp的安装配置
- Linux下安装配置ftp
- Linux 下FTP的安装与配置教程详解
- Linux下FTP的安装配置
- Linux FTP的安装与配置
- linux下FTP服务器的安装和简单配置
- LINUX FTP安装与配置
- Linux FTP安装与简单配置
- Linux学习笔记:REHL AS4的上网配置,Http服务安装及配置,ftp服务的安装及配置
- linux下pureftpd的安装与配置(FTP服务器)
- Linux: FTP服务原理及vsfptd的安装、配置
- LINUX FTP安装与配置
- Linux安装配置FTP,用户登陆后只允许访问指定的目录。并解决vsftpd的”530 Login incorrect”错误
- Linux系统上的FTP安装配置及登录
- Linux下vsftpd安装以及配置FTP虚拟用户实践
- Linux FTP的安装与配置
- linux上ftp服务安装配置介绍