<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Understanding SQL syntax difference between MySQL and SQLAnywhere (PHP) in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaa-p/13842536#M4873379</link>
    <description>&lt;P&gt;Thanks. This helped me establish that if I log in as the user 'EM' I can now run the query like this:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="nv"&gt;$query&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;DB::&lt;/SPAN&gt;&lt;SPAN class="n"&gt;query&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;'SELECT * FROM "Users"'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;Which is what I wanted.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2012 09:24:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-12-06T09:24:33Z</dc:date>
    <item>
      <title>Understanding SQL syntax difference between MySQL and SQLAnywhere (PHP)</title>
      <link>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaq-p/13842534</link>
      <description>&lt;P&gt;I've inherited a SQLAnywhere database that somebody else created. I'm more used to MySQL. I'm able to connect and query both databases.&lt;/P&gt;
&lt;P&gt;Example of a working query for the MySQL database:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="nv"&gt;$query&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;DB::&lt;/SPAN&gt;&lt;SPAN class="n"&gt;query&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;'SELECT * FROM `Users`'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;Example of a working query for the SQLAnywhere database:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="nv"&gt;$query&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;DB::&lt;/SPAN&gt;&lt;SPAN class="n"&gt;query&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;'SELECT * FROM "EM"."Users"'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;My question is about what the 'EM.' prefix is: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;is this a table prefix?&lt;/LI&gt;
&lt;LI&gt;is it required?&lt;/LI&gt;
&lt;LI&gt;can the separator (period) be changed to another symbol?&lt;/LI&gt;
&lt;LI&gt;where in Sybase Central can the prefix name be edited?&lt;/LI&gt;
&lt;LI&gt;if it's not required, how can I remove it?&lt;/LI&gt;
&lt;LI&gt;if it is required, how do I manage my code to keep the SQL statements portable?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 06 Dec 2012 08:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaq-p/13842534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-06T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding SQL syntax difference between MySQL and SQLAnywhere (PHP)</title>
      <link>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaa-p/13842535#M4873378</link>
      <description>&lt;P&gt;The EM is the name of the table owner, if your user is not EM or in the group of EM you need the right to access the table and also need to address the table with the owner. From the docs:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"Tables owned by a different user can be qualified by specifying the user ID. Tables owned by groups to which the current user belongs are found by default without specifying the user ID."&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 06 Dec 2012 09:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaa-p/13842535#M4873378</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2012-12-06T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding SQL syntax difference between MySQL and SQLAnywhere (PHP)</title>
      <link>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaa-p/13842536#M4873379</link>
      <description>&lt;P&gt;Thanks. This helped me establish that if I log in as the user 'EM' I can now run the query like this:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="p"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="nv"&gt;$query&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;DB::&lt;/SPAN&gt;&lt;SPAN class="n"&gt;query&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s"&gt;'SELECT * FROM "Users"'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;);&lt;/SPAN&gt;
&lt;SPAN class="p"&gt;}&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;Which is what I wanted.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 09:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/understanding-sql-syntax-difference-between-mysql-and-sqlanywhere-php/qaa-p/13842536#M4873379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-06T09:24:33Z</dc:date>
    </item>
  </channel>
</rss>

