<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Syntax on BareSQL.com</title>
    <link>https://baresql.com/tags/syntax/</link>
    <description>Recent content in Syntax on BareSQL.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 26 Oct 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://baresql.com/tags/syntax/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Backticks Around Names Work on MySQL and SQLite and Fail on PostgreSQL</title>
      <link>https://baresql.com/backticks-around-names-work-on-mysql-and-sqlite-and-fail-on-postgresql/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://baresql.com/backticks-around-names-work-on-mysql-and-sqlite-and-fail-on-postgresql/</guid>
      <description>&lt;p&gt;MySQL examples often quote every name in backticks, as in &lt;code&gt;SELECT `name` FROM `people`&lt;/code&gt;. Copied into a PostgreSQL project, the query fails.&lt;/p&gt;&#xA;&lt;p&gt;`name` is MySQL’s way of quoting a name, and SQLite and MariaDB accept it too. PostgreSQL reads the backtick as a syntax error.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://baresql.com/images/rule-backticks.png&#34; alt=&#34;SELECT `name` FROM people, run on four engines: SQLite 3.45.1 &#39;Ann&#39;; PostgreSQL 16.15 error: syntax error at or near &amp;quot;FROM&amp;quot;; MySQL 8.0.46 &#39;Ann&#39;; MariaDB 10.11.14 &#39;Ann&#39;.&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Double Dash Comments Need a Space After Them on MySQL and MariaDB</title>
      <link>https://baresql.com/double-dash-comments-need-a-space-after-them-on-mysql-and-mariadb/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://baresql.com/double-dash-comments-need-a-space-after-them-on-mysql-and-mariadb/</guid>
      <description>&lt;p&gt;In a line like &lt;code&gt;SELECT price --discount&lt;/code&gt;, left over from debugging, SQLite and PostgreSQL read &lt;code&gt;--discount&lt;/code&gt; as a comment. MySQL and MariaDB add the discount to the price instead.&lt;/p&gt;&#xA;&lt;p&gt;SQLite and PostgreSQL treat every -- as the start of a comment. MySQL and MariaDB need a space, a tab or a line break after the dashes; otherwise they are two minus signs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://baresql.com/images/rule-dash-comment.png&#34; alt=&#34;SELECT 1 --1, run on four engines: SQLite 3.45.1 1; PostgreSQL 16.15 1; MySQL 8.0.46 2; MariaDB 10.11.14 2.&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Double Quotes Name a Column on PostgreSQL and Make a String on MySQL</title>
      <link>https://baresql.com/double-quotes-name-a-column-on-postgresql-and-make-a-string-on-mysql/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://baresql.com/double-quotes-name-a-column-on-postgresql-and-make-a-string-on-mysql/</guid>
      <description>&lt;p&gt;A query copied from PostgreSQL that puts a column name in double quotes runs on MySQL without an error, and never reads the column.&lt;/p&gt;&#xA;&lt;p&gt;Standard SQL quotes names with double quotes, and SQLite and PostgreSQL follow it. MySQL and MariaDB read &amp;quot;...&amp;quot; like &#39;...&#39; unless the ANSI_QUOTES mode is on: the query still runs and returns the same text on every row. SQLite also turns a double-quoted word into a string when no column has that name.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hash Comments Work on MySQL and MariaDB and Become an Operator on PostgreSQL</title>
      <link>https://baresql.com/hash-comments-work-on-mysql-and-mariadb-and-become-an-operator-on-postgresql/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://baresql.com/hash-comments-work-on-mysql-and-mariadb-and-become-an-operator-on-postgresql/</guid>
      <description>&lt;p&gt;MySQL and MariaDB skip everything from a &lt;code&gt;#&lt;/code&gt; to the end of the line. On SQLite and PostgreSQL that &lt;code&gt;#&lt;/code&gt; is still part of the statement.&lt;/p&gt;&#xA;&lt;p&gt;Scripts written for the mysql client often use # comments. SQLite stops with a syntax error. On PostgreSQL # is a bitwise exclusive or, so the rest of the line becomes part of the expression.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://baresql.com/images/rule-hash-comment.png&#34; alt=&#34;SELECT 1 # one, run on four engines: SQLite 3.45.1 error: unrecognized token: &amp;quot;#&amp;quot;; PostgreSQL 16.15 error: column &amp;quot;one&amp;quot; does not exist; MySQL 8.0.46 1; MariaDB 10.11.14 1.&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>PostgreSQL Returns Column Names in Lower Case Unless You Quote Them</title>
      <link>https://baresql.com/postgresql-returns-column-names-in-lower-case-unless-you-quote-them/</link>
      <pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://baresql.com/postgresql-returns-column-names-in-lower-case-unless-you-quote-them/</guid>
      <description>&lt;p&gt;&lt;code&gt;SELECT SUM(amount) AS Total&lt;/code&gt; gives a column named Total on SQLite, MySQL and MariaDB. PostgreSQL calls it total.&lt;/p&gt;&#xA;&lt;p&gt;SQLite, MySQL and MariaDB return names as written. PostgreSQL folds unquoted names to lower case, in aliases and in CREATE TABLE alike, so code that reads columns by name (row[&amp;quot;Total&amp;quot;]) finds nothing on PostgreSQL.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://baresql.com/images/rule-column-name-case.png&#34; alt=&#34;SELECT 1 AS Total, run on four engines: SQLite 3.45.1 columns Total: 1; PostgreSQL 16.15 columns total: 1; MySQL 8.0.46 columns Total: 1; MariaDB 10.11.14 columns Total: 1.&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
