MySQL・ノート2

830 ワード

きほんかんすう
lower(   )   
upper(   )   
length(   )     
substr(   ,      ,    )(    )  
concat(   ,    )    
replace(   ,    ,    )  

round    
ceil    
floor    
max(   )    
min(   )    
sum(   )  
avg(   )   

select now() --       
select curdate() --   
select curtime() --   
--year()  month()  day()    

select now(),year(now()),month(now()),day(now()) from emp;

--hour()   minute()  second() 

select now(),hour(now()),minute(now()),second(now()) from emp;

distinct        
SELECT DISTINCT     FROM   ;

    
where
and    &   
or   |  
between  and     
is null   
is not  null    

    
like  %   、     
-        

  
limit    N   N   
    ,S  N S    N   

  
by        asc       
desc    

count(   )          

group by                  

having     where      ,where     ,having