zoukankan      html  css  js  c++  java
  • Oracle语句

    1、使用过的

    --备份表
    	create bak_TB_student as select * from TB_student;
    --清空表
    	truncate table TB_student;
    	delete TB_student
    --删除表
    	drop table TB_student;
    --排序
    	select * from TB_student order by m_age desc;
    --根据日期进行删除
    	delete from TB_student where m_time
    		between to_date('1996-10-10 00:00:00','YYYY-MM-DD HH24:MI:SS
    		and to_date('2020-10-10 00:00:00','YYYY-MM-DD HH24:MI:SS');
    --添加字段
    	alter table TB_student add(m_time);
    --去重查询
    	select distinct m_time from TB_student order by m_time desc;
    	select distinct m_time,m_age from TB_student order by m_time desc;
    
    
    --查找所有表名是以'TB'开头的,并且倒叙排序
    SELECT table_name FROM user_tables
    	WHERE table_name like 'TB%'		--%代表任意多个字符		_代表任意一个字符
    	ORDER BY table_name DESC
    
    --模糊查询like
    select * from TB_student
    	where m_name like 'xiaomin'
    	and m_age like '%%'
    	and m_birthday like TO_DATA(:l_data, 'YYYY-MM-DD')
    

      

  • 相关阅读:
    URLEncode解决url中有特殊字符的问题
    监控系统概览
    SpringBoot 上传文件夹
    关于postgresql报 ERROR: XXX does not exist
    postgresql学习
    git学习
    学习博客
    面试准备
    jvm
    线程池面试题
  • 原文地址:https://www.cnblogs.com/wangbin-heng/p/10380905.html
Copyright © 2011-2022 走看看