본문 바로가기

컴퓨터 과학 & 영상처리 관련/DB

count


SQL> select count(*)
  2  from student
  3  group by dept;

  COUNT(*)
----------
         1
         3
         1

 

   1  select dept, count(*) as num
  2  from student
  3* group by dept

DEPT                                  NUM
------------------------------ ----------
ilectronic                              1
computer                                3
san_gong                                1

SQL>

'컴퓨터 과학 & 영상처리 관련 > DB' 카테고리의 다른 글

sqlplus 휴지통 비우기  (0) 2011.06.01
SQL  (1) 2011.05.12