Changes

Jump to: navigation, search

Difference MySQL PostGreSQL

843 bytes added, 09:02, 19 June 2014
no edit summary
=== Case sensitivity and column names ===__NOEDITSECTION__
PostgreSQL, as opposed to MySQL, is case-sensitive. This means that strings need to be provided in exactly the way they are stored in the database. For example, in the table IMSMAENUM, one out of many values in the column ENUMVALUE is ''Progress Report'', with capital P and capital R. In mySQL it was possible to write:
<pre>
SELECT *
FROM imsmaenum
WHERE enumvalue = 'progress report'
</pre>
and still get one row as result. In PostgreSQL, the same query will return no result.
 
Therefore, a create view statement like this:<br />
'''mySQL'''
<pre>
CREATE OR REPLACE VIEW my_view AS
SELECT ...
FROM imsmaenum, ...
WHERE imsmaenum.enumvalue = 'progress report';
</pre>
 
needs to be changed to:<br />
'''PostgreSQL'''
<pre>
CREATE OR REPLACE VIEW my_view AS
SELECT ...
FROM imsmaenum, ...
WHERE imsmaenum.enumvalue = 'Progress Report';
</pre>
=== The GROUP BY clause ===__NOEDITSECTION__
1,068
edits

Navigation menu