What are you referring to as "SQL"? As far as I know, ISO-standard SQL doesn't have variables outside of its procedural language. I'm also not aware of any SQL-wide naming conventions. But I haven't read any of the standards, so I could be missing something.
"T-SQL" - in reality, everyone just refers to it as SQL Server even though it's obviously not a language.
I find this syntax super helpful:
DECLARE @someName AS VARCHAR(100)
SET @someName= 'Bob'
When coupled with SPs and Functions, you can write some fairly readable logic in SQL. I am completely against this for most applications, but when you need it, it helps.
Oh, alright. I know T-SQL and have actually missed variables in PostgreSQL before. Just please don't shorten it to "SQL", it's only one dialect of many.
> have actually missed variables in PostgreSQL before
You can just use a DO-block with plpgsql (or any other installed procedural language) code to make variables available in Postgres. T-SQL just somewhat elides the distinction between declarative and procedural code.
2. Weak support for functions/SPs as a result.
3. Naming conventions inconsistent with SQL which makes any ORMs a pain.