Home > Database > Mysql Tutorial > sqlserver 随机数问题

sqlserver 随机数问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:39:38
Original
1329 people have browsed it

我写了个存储过程 ALTER PROCEDURE [dbo].[SP_Personal_AddRandom] @count INT , @StageID INT , @PassWord NVARCHAR(50) , @CreateUser INT AS INSERT INTO dbo.Personal ( StageID , TypeID , PersonalName , Password , CreateUser ) ( SELECT TOP (@Coun

我写了个存储过程

ALTER  PROCEDURE [dbo].[SP_Personal_AddRandom]
    @count INT ,
    @StageID INT ,
    @PassWord NVARCHAR(50) ,
    @CreateUser INT
AS
    INSERT  INTO dbo.Personal
            ( StageID ,
              TypeID ,
              PersonalName ,
              Password ,
              CreateUser
        
            )
            ( SELECT TOP (@Count)
                        @StageID,
                        TypeID,
                        Name,
                        @PassWord,
                        @CreateUser
              FROM      dbo.SysPersonnel
              ORDER BY NEWID()
            )

消息 156,级别 15,状态 1,过程 SP_Personal_AddRandom,第 29 行
关键字 'ORDER' 附近有语法错误。 请问如何改正 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Problem with tp6 connecting to sqlserver database
From 1970-01-01 08:00:00
0
0
0
Unable to connect to SQL Server in Laravel
From 1970-01-01 08:00:00
0
0
0
Methods of parsing MYD, MYI, and FRM files
From 1970-01-01 08:00:00
0
0
0
SQLSTATE: User login failed
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template