Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 inputting a value

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-12-09 : 06:48:30
abhilash writes "dear,

how can we accept a value from the user ?

say, something like the & <variable name> in oracle?
for example,

select name from authors where age=&value(here user should be able to input a value from keyborad when query is run)

thanks

abh"

surendrakalekar
Posting Yak Master

120 Posts

Posted - 2005-12-09 : 07:39:45
Declare @age int
Select @age = 25
Select Name from authors where age = @age


Surendra
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-09 : 08:31:04
In Books On Line, SQL Server help file refer variables, assigning for more information

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -