Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bronson
Last active February 9, 2016 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bronson/0a49e7d3fe7242cb5cd3 to your computer and use it in GitHub Desktop.
Save bronson/0a49e7d3fe7242cb5cd3 to your computer and use it in GitHub Desktop.
continuation
mariadb 10.1.8-MariaDB-log (root) [test]> create table t1 (id serial, t time);
Query OK, 0 rows affected (0.01 sec)
mariadb 10.1.8-MariaDB-log (root) [test]> insert into t1 (t) values ('12:30:00');
Query OK, 1 row affected (0.00 sec)
mariadb 10.1.8-MariaDB-log (root) [test]> select * from t1 where t = '2000-01-01 12:30:00';
Empty set (0.00 sec)
mysql 5.6.26-log (root) [test]> create table t1 (id serial, t time);
Query OK, 0 rows affected (0.01 sec)
mysql 5.6.26-log (root) [test]> insert into t1 (t) values ('12:30:00');
Query OK, 1 row affected (0.00 sec)
mysql 5.6.26-log (root) [test]> select * from t1 where t = '2000-01-01 12:30:00';
+----+----------+
| id | t |
+----+----------+
| 1 | 12:30:00 |
+----+----------+
1 row in set (0.00 sec)
postgresql=# create table t1 (id serial, t time);
CREATE TABLE
postgresql=# insert into t1 (t) values ('12:30:00');
INSERT 0 1
postgresql=# select * from t1 where t = '2000-01-01 12:30:00';
t
----------
12:30:00
(1 row)
SQL Server
create table t1 (id int identity(1,1), t time);
insert into t1 (t) values ('12:30:00');
select * from t1 where t = '2000-01-01 12:30:00';
1 12:30:00.0000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment