随笔分类 - Oracle
摘要:select to_char(last_day(to_date('2020-02','yyyy-mm')),'dd') from dual用 last_day 的函数
        阅读全文
                
摘要:CREATE USER etcportal IDENTIFIED BY etcportal; GRANT CONNECT,RESOURCE,EXP_FULL_DATABASE,IMP_FULL_DATABASE TO etcportal;
        阅读全文
                
摘要:SELECT sys_guid(),rawtohex(sys_guid()) from dual;
        阅读全文
                
摘要:select 'drop table '||table_name||';' from cat where table_type='TABLE'
        阅读全文
                
摘要:创建、删除 create sequence seq_newsId increment by 1 start with 1 maxvalue 999999999; 得到序列的SQL语句 select seq_newsid.nextval from sys.dual; 删除序列的SQL DROP SEQ
        阅读全文
                
摘要:SELECT CONCAT(CONCAT(列名,’拼接在中间的符号’),列名) FROM `sys_auth` sa ;
        阅读全文
                
摘要:Case when a=xx then ‘xx’ when a=’zz’ then ‘zz’ else ‘cc’ end as 别名相当于 if-else if-elsecase when bid.bid_stage=1 then '招标阶段' when bid.bid_stage=2 then '
        阅读全文
                
摘要:oracle中可以使用drop、delete和truncate三个命令来删除数据库中的表, 1. delete和truncate都是删除表中的内容而不能删除表的结构,而drop则是删除表的结构和内容(表将不复存在); 2. delete可以删除整个表的数据也可以有选择性地删除某一条或多条数据,而tr
        阅读全文
                
                    
                
浙公网安备 33010602011771号