小编Vik*_*ram的帖子

如何在 POSTGRESQL 中编写普通的选择过程

我无法在 PostgreSQL 中编写正常的选择过程。我在 SQL Server 方面有很好的经验。但 Postgres 看起来完全是一个不同的星球。

有人能帮我如何在 Postgres 中写这个语句吗?

create proc procedurename @somedate date
 begin
select * from sometable where date>= @somedate
end
Run Code Online (Sandbox Code Playgroud)

我可以像这样执行它

exec procedurename 2017-05-02
Run Code Online (Sandbox Code Playgroud)

我尝试编写一个存储过程,它返回一个带有类似内容的表

    Create or replace function hrms.salary() returns table(
lastmodified    timestamp without time zone ,
employeeid  integer ,
insuranceno character varying   ,
uanno   character varying   ,
basic   integer ,
hra numeric ,
conveyence  integer ,
fixedallowance  integer ,
epf numeric ,
eps numeric ,
esic    numeric ,
bankname    character varying   ,
ifsccode …
Run Code Online (Sandbox Code Playgroud)

postgresql

1
推荐指数
1
解决办法
3万
查看次数

标签 统计

postgresql ×1