Dream what you want to dream,go where you want to go,do what you want to do,be what you want to be,because you have only one chance and one life to do all things that you want to do.
常见sql语句汇总
上一篇 /
下一篇 2010-06-28 13:51:00
/ 个人分类:Cent OS
查询数据库中所有的表(同时拥有者为DMS)
SELECT * from all_tables where wner='DMS'
SELECT COLUMN_NAME FROM User_Tab_Columns WHERE table_name='HF_NODE_16' (表名大写)
desc hf_node_16
按列的ID排序,用途是可以和SQL查询的值一一对应起来
SELECT COLUMN_NAME FROM User_Tab_Columns WHERE table_name='HF_NODE_16'order by column_id
查询时间
select CREATETIME from file_stats
select sysdate from dual
select (sysdate-CREATETIME)*24 from file_stats
查询第一条记录:
oracle: select field from table_name whererownum=1
ms sql: selecttop kfrom table_name(k=1可以改变k的值)
mysql: select field from table_name where ...limit k(k=1可以改变k的值)
mysql
:gsbv6001:root > mysql -u root -ppass
mysql> use replication;show tables;
收藏
举报
TAG: