How to test my ad-hoc SQL with parameters in Postgres query window

前端 未结 3 1921
感情败类
感情败类 2020-12-19 03:57

In Microsoft SQL Server, to test something like this in the query window:

select * from Users where LastName = @lastname

I can add this bef

3条回答
  •  萌比男神i
    2020-12-19 04:44

    Perhaps using the DO instruction to simulate a function. In that way you can declare variables and use them to execute your query!

    http://www.postgresql.org/docs/9.4/static/sql-do.html

提交回复
热议问题