# Connection: root@localhost:3306 # Host: localhost # Saved: 2008-02-06 23:40:52 # # Connection: root@localhost:3306 # Host: localhost # Saved: 2008-02-05 23:42:25 # USE prove; CREATE TABLE tempi_e_date ( Id_Td INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT, data DATE, tempo TIME, tempo_e_data DATETIME, anno YEAR ) SELECT NOW() SELECT DATE(NOW()) SELECT TIME(NOW()) SELECT * FROM tempi_e_date ORDER BY Tempo DESC SELECT data, COUNT(*) FROM tempi_e_date GROUP BY data SELECT SUM(tempo) AS Tempo_totale FROM tempi_e_date SELECT TIME(SUM(tempo)) AS Tempo_totale FROM tempi_e_date SELECT DATE(SUM(data)) AS Tempo_totale FROM tempi_e_date SELECT DATEDIFF(data, '1970-01-01') AS Tempo_passato FROM tempi_e_date SELECT TIMEDIFF(tempo, TIME(tempo_e_data)) AS Tempo_passato FROM tempi_e_date SELECT TIMEDIFF(tempo, SEC_TO_TIME(TIME_TO_SEC(tempo_e_data))) AS Tempo_trascorso FROM tempi_e_date SELECT TO_DAYS(data) FROM tempi_e_date SELECT DATE_FORMAT(data,'%d-%m-%Y') FROM tempi_e_date SELECT TIME_FORMAT(CURRENT_TIME(),'%h : %i %p'); SELECT * FROM tempi_e_date WHERE data = '1990-09-20' SELECT * FROM tempi_e_date WHERE data < '1990-09-20' SELECT DAY(CURRENT_DATE()) SELECT MONTH(CURRENT_DATE()) SELECT YEAR(CURRENT_DATE()) SELECT DAYNAME(CURRENT_DATE()) SELECT MONTHNAME(CURRENT_DATE()) SELECT HOUR(CURRENT_TIME()) SELECT MINUTE(CURRENT_TIME())