第一种 concat select * from cat_table where cat_name like concat(#{catName},'%') --单个百分号 select * from cat_table where cat_name like concat(concat('%',#{catName}),'%') --前后百分号 第二种 || select * from cat_table where cat_name like '%' || #{catName} || '%' 第
分组去重查询,并执行某一个函数 :select 分组字段,聚合函数 from 表名 where 条件 group by分组字段 select 分组字段,聚合函数 from 表名 where 条件 group by分组字段 having过滤条件 例:select cno, avg(degree) from score group by cno having count(sno)>=5: 模糊查询 : like select * from 表名 where 字段 like '字符串%'
Oracle.DataAccess.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.CreateComm
System.Data.OracleClient.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.Cre
Oracle.ManagedDataAccess.dll方式操作oracle数据库 一.查询语句: using (OracleConnection conn = new OracleConnection(System.Configuration.ConfigurationManager.ConnectionStrings["local_Orcl"].ConnectionString)) { conn.Open(); using (OracleCommand cmd = conn.Cre
oracle数据库经典SQL查询 .查看表空间的名称及大小 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespace_name; .查看表空间物理文件的名称及大小 select tablespace_name,