04pallav
9/13/2017 - 9:53 PM

Small things

Small things

1.
<>    Not equal to 
select name,capital from world where left(name,1)=left(capital,1) and name<> capital

2.
select * from nobel where winner ='EUGENE O''NEILL'
#when you want to select someone with the name EUGENE O'NEILL

3.
count(*),min,max will IGNORE values

4.
a is null ##### not a=NULL

5.
NOT IN (2,2,2,NULL)  is an empty set

6. Distinct (1,2,2,NULL) = 1,2,NULL
   min(1,1,NULL) = 1
   
   
7. Dont NAME subquery Table inside an in statement
   in( select countries from world) will work