Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Support set variables #330

Open
cprieto opened this issue Oct 26, 2021 · 0 comments
Open

Support set variables #330

cprieto opened this issue Oct 26, 2021 · 0 comments

Comments

@cprieto
Copy link
Contributor

cprieto commented Oct 26, 2021

Support set variables for certain SQL dialects.

  • MySQL, SET [GLOBAL | SESSION] [@]variable = value;
  • PostgreSQL, SET [LOCAL | SESSION] variable [=|TO] value

SQL Server cannot set a variable without declaring it first:

DECLARE @variable INT;
SET @variable = 1;

In MySQL, the prefix @ is optional while in SQL Server is required.

SQLite does not support setting variables.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant