26.11.2014 Views

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

!= <br />

opera<strong>to</strong>r<br />

(expr1 = expr2 OR ((expr1<br />

IS NULL) AND (expr2 IS<br />

NULL)))<br />

The opera<strong>to</strong>r represents equality<br />

including NULL values (NULL=NULL<br />

is true).<br />

ISNULL(expr)<br />

IS NULL expr<br />

INTERVAL(N, N1, N2,…) None built in A user defined function could easily<br />

be used <strong>to</strong> achieve the same<br />

functionality. For example: if (N <<br />

N1) then 0 elseif (N < N2) then 1<br />

elseif…<br />

! NOT<br />

&&<br />

AND<br />

|| OR<br />

A XOR B<br />

((a AND (NOT b)) OR ((NOT<br />

a) AND b))<br />

The <strong>SQL</strong> <strong>Anywhere</strong> expression is<br />

complex for large numbers of XOR<br />

arguments, so an alternative<br />

migration technique is<br />

recommended dependent on the<br />

application scenario.<br />

Data Manipulation Language<br />

<strong>Postgre<strong>SQL</strong></strong> statement<br />

INSERT …<br />

Equivalent <strong>SQL</strong> <strong>Anywhere</strong><br />

statement<br />

INSERT …<br />

Notes<br />

ON DUPLICATE KEY UPDATE ON EXISTING UPDATE <strong>SQL</strong> <strong>Anywhere</strong> also offers the options<br />

ERROR and SKIP for existing rows.<br />

SELECT …. INTO OUTFILE<br />

SELECT/UPDATE/DELETE …<br />

LIMIT<br />

DEFAULT ‘0’ NOT NULL<br />

au<strong>to</strong>_increment<br />

LIMIT offset, numRows<br />

UNLOAD SELECT<br />

DBI<strong>SQL</strong> OUTPUT TO<br />

FIRST or TOP n<br />

NOT NULL DEFAULT<br />

AUTOINCREMENT<br />

TOP numRows START AT<br />

offset<br />

2 <strong>Migrating</strong> a <strong>Postgre<strong>SQL</strong></strong> <strong>Database</strong> <strong>to</strong> <strong>SQL</strong> <strong>Anywhere</strong> <strong>12</strong><br />

December 2011

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!