基本常用查询 --select select * from student; --all 查询所有 select all sex from student; --distinct 过滤重复 select distinct sex from student; --count 统计 select count(*) from student; select count(sex) from student; select count(distinct sex) from student; --top 取…
一.常用的查询语句 1.1 常用查询 查表中有多少个字段 select count(*) from user_tab_columns where table_name=upper('表名') 或者 select max(column_id) from user_tab_columns where table_name=upper('表名') 1.2 日期/时间 相关查询 获取当前月份的第一天 SELECT TRUNC (SYSDATE, 'MONTH') "First day of curren…