
mysql如何在select语句中对time类型的值进行比较?
SELECT * FROM table WHERE time_to_sec(time)<time_to_sec('15:00:00')
以上为比较方法。
在Oracle系统中,select语句的基本语法格式如下:
select [distinct] [*, column_name [alias], …] from tablename Where {conditions} group by {conditions} having order by expressions} [ASC/DESC];
查询所有列:
select * from table;
查询指定列:select colum1,colum2 from table;
取消重复行:select distinct deptno,job from emp;
使用表达式:可以在查询列中使用表达式来连接字符串(使用 || 连接字符串)、改变显示格式(如使用函数to_char)、计算显示的数据(如使用+,-,×,/)等。
举例:
select * from emp;
select ename ,sal,deptno from emp;
select deptno from emp;
select distinct deptno from emp;
广告 您可能关注的内容 |