Meine gespeicherte SQL-Prozedur mit SELECT gibt nur Tabelle ohne Werte zurück, zeigt nur den Spaltennamen ohne Werte an? Warum? Wie ruft man Werte der Tabelle mit gespeicherter Prozedur ab?SQL Stored Procedure Auswahl gibt nur Tabelle ohne Werte zurück
[1]: http://i.stack.imgur.com/79Gt2.jpg
USE [Mobile]
GO
/****** Object: StoredProcedure [dbo].[UserRegisterproc] Script Date: 05/23/2016 10:51:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[UserRegisterproc]
@mode int=null,
@id int=null,
@name varchar(30)=null,
@usertype varchar(30)=null,
@username varchar(30),
@password varchar(30),
@email varchar(30)=null,
@mob varchar(30)=null
as begin
if (@mode =1)
begin
insert into UserRegister (name,usertype,username,password ,email,mob)values(@name,@usertype,@username,@password ,@email,@mob)
end
if(@mode =2)
begin
select * from UserRegister
end
if (@mode =3)
begin
update UserRegister set [email protected],[email protected],[email protected] ,[email protected],[email protected] where [email protected]
end
if(@mode =4)
begin
delete from UserRegister where [email protected]
end
if(@mode =5)
begin
select * from UserRegister where username [email protected] and password [email protected]
end
if(@mode =6)
begin
select * from UserRegister where usertype= @usertype
end
if(@mode =7)
begin
select * from UserRegister where usertype [email protected] and username [email protected]
end
end
Die Abfrage, die in dem SP verwandt wird, gab keine Zeilen daher zurück. Bitte poste den SP. –
Wollen Sie, dass wir raten? – sagi
Bearbeiten Sie Ihre Antwort bitte und fügen Sie sie dort im richtigen Format hinzu. – sagi