How to translate this query:

Posted by xRobot on Stack Overflow See other posts from Stack Overflow or by xRobot
Published on 2010-06-07T18:09:27Z Indexed on 2010/06/07 18:12 UTC
Read the original article Hit count: 158

Filed under:
|
|

How can I translate this 2 queries in postgresql ? :

.

CREATE TABLE example (

id int(10) unsigned NOT NULL auto_increment,

from varchar(255) NOT NULL default '0',

message text NOT NULL,

lastactivity timestamp NULL default '0000-00-00 00:00:00',

read int(10) unsigned NOT NULL,

PRIMARY KEY (id),

KEY from (from)

) DEFAULT CHARSET=utf8;

.

SELECT *
FROM table_1
LEFT OUTER JOIN table_2 ON ( table_1.id = table_2.id ) 
WHERE (table_1.lastactivity > NOW()-100);

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database