データベースの文のまとめ

2125 ワード

//    

alter table essay add index index_title(title)
show index from essay
desc select * from essay where title='           '
desc select * from essay where eid=5

      

select * from user_tab_comments where comments like'%  %'

        

select * from user_tab_comments where table_name='LM_LOAN_PURPOSE_PROVE'


       

ALTER TABLE `t_bu_fin_appl`
MODIFY COLUMN  `CREATE_TIME` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '    ' ;

    
set global time_zone = '+08:00';

set time_zone='+08:00';
flush privileges;


too many connections 
      
show global variables like '%timeout%';
set global WAIT_TIMEOUT=20;

          
SHOW PROCESSLIST;


KILL   48426


          

ALTER table   `t_bu_fin_appl`   modify  `UPDATE_TIME`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '    ' 

ALTER table   `t_bu_fin_appl`   modify  `UPDATE_TIME`  timestamp  ON UPDATE CURRENT_TIMESTAMP COMMENT '    ' 

   
alter table t_bu_repay_accounts add column C_INSU_TYPE varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '    ';

              
select q.BUSINESS_NO,q.DUE_DAY from t_bu_repay_apply  q inner join (


select BUSINESS_NO,DUE_DAY,count(uuid) u from t_bu_repay_apply t group by BUSINESS_NO,DUE_DAY having u>1

) t on q.BUSINESS_NO=t.BUSINESS_NO and q.due_day= t.DUE_DAY order by DUE_DAY
8. oracle     
select * 
from user_col_comments 
where Table_Name='S_OUTDATA_CTRL'
 and column_name='CRT_BCH'

9.         ,      
alter table  t_bu_bank_account  AUTO_INCREMENT =1;
truncate  t_bu_bank_account
10.          
SELECT table_name FROM information_schema.columns WHERE column_name='APPL_ID';
SELECT table_name FROM information_schema.columns WHERE column_Comment like '%    %';
11.          
select
TABLE_NAME,
TABLE_COMMENT
from
INFORMATION_SCHEMA.Tables a where a.TABLE_COMMENT like '%   %'
12.mysql        
 SELECT
table_name   ,
table_comment     
FROM
information_schema.TABLES where table_name='T_RC_PROD_LIST'