![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
如风666
这个作者很懒,什么都没留下…
展开
-
shell脚本取出mysql中的值,然后赋值给shell的变量
test.sh:#!/bin/sh##TEMP=$(mysql -uroot --database dbname -e "select name from tablename where id=1");echo $TEMP;原创 2012-01-17 15:44:18 · 8954 阅读 · 5 评论 -
postgresq与mysql中timestampdiff(SECOND,字段,NOW())相同求时间差值的秒值
mysql中写法:select timestampdiff(SECOND,createtime,NOW()) from table1;postgresql:select extract(epoch FROM CURRENT_TIMESTAMP) - extract(epoch FROM createtime) from table1;表:table1字段:c原创 2013-07-18 16:46:38 · 5219 阅读 · 0 评论