MySQL to Postgres migration links

I just started looking into MySQL to Postgres migration. One of the differences between the two is LAST_INSERT_ID() for MySQL and CURRVAL(‘serial_variable’) for Postgres. Although there were many pages with examples about these, I found this page useful at explaining how to use the function. This page appears to be a good resource that lists […]

Read more "MySQL to Postgres migration links"

SQL: LEFT JOIN tables

Today, I found a need to show all rows in a table and add associated information from another table. After reading a SQL reference manual on LEFT JOIN, I gave it a try and it met my needs. Here is the general format: SELECT field1, field2 FROM table1 LEFT JOIN table2 ON condition1 WHERE condition2 […]

Read more "SQL: LEFT JOIN tables"