Questions tagged [variable]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 views

Is it safe to use user defined variables inside stored procedures in MySQL?

Currently I'm working with Stored Procedures in MySQL and I'm using in some procedures user-defined variables and I've seen that type of variables are initialized in the current session and keep their ...
user avatar
0 votes
1 answer
44 views

Count how many variables equal a target value

Is there a smart way to count how many variables equal some target value (in SQL Server)? For example, if I have: declare @a int = 1; declare @b int = 2; declare @c int = 1; declare @target int = 1; ...
user avatar
  • 341