stored procedure variable names
От | inspector morse |
---|---|
Тема | stored procedure variable names |
Дата | |
Msg-id | CAHYn==63WqKYRSQGwmtaNa1uHO4SqAPu8LooPmbubJHfsjxxxg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: stored procedure variable names
Re: stored procedure variable names Re: stored procedure variable names Re: stored procedure variable names Re: stored procedure variable names |
Список | pgsql-general |
In all other DBMS, the variable names have a distinctive character to differentiate between variables and column names:
Example:It makes it easier to write and manage queries especially in stored procedures.
Just compare the below:
create stored procedure get_user_for_editing(user_id int, out username varchar) select username into @username from users where user_id = @user_id;
end;to this mess:
create stored procedure get_user_for_editing(user_id int, out username varchar)
begin
select u.username into get_user_for_editing.username from users u where get_user_for_editing.user_id = get_user_for_editing.user_id;
end;В списке pgsql-general по дате отправления: