Oracle:

select to_char(sysdate,'yyyy-MM-dd hh24:mi:ss') from dual;

Mysql:

select DATE_FORMAT(now(),'%Y-%m-%d %H:%i:%s')