English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
테이블 총 수를 계산하려면 table_schema를 포함한 count()를 사용하세요.*) 개념. 먼저, 데이터베이스 “업무”에 얼마나 많은 테이블이 있는지 확인하려면 “show” 명령어를 사용해야 합니다.
mysql> show tables;
이하는 데이터베이스 “business”에 있는 모든 테이블을 출력하는 내용입니다。
+--------------------------+ | business에 있는 테이블 | +--------------------------+ | 체크 제약 조건 추가 데모 | | 추가 열 테이블 | | 제약 조건 추가 데모 | | NULL 추가 데모 | | 알파 데모 | | 자동 증가 | | 자동 증가 테이블 | | backticksymbol | | bookindexes | | chardemo | | checkdemo | | clonestudent | | columnexistdemo | | columnvaluenulldemo | | commaseperatedemo | | currentdatetime | | dateadddemo | | deletedemo | | deleterecord | | demo | | demo |1 | | demo | | demoascii | | demoauto | | demobcrypt | | demoemptyandnull | | demoint | | demoonreplace | | demoschema | | distcountdemo | | distinctdemo | | distinctdemo |1 | | duplicatebookindexes | | duplicatefound | | employeerecords | | employeetable | | escapedeom | | existsrowdemo | | findandreplacedemo | | firsttable | | foreigntable | | foreigntabledemo | | functionindexdemo | | functiontriggersdemo | | groupconcatenatedemo | | groupdemo | | groupdemo1 | | groupt_concatdemo | | ifelsedemo | | imagedemo | | incasesensdemo | | indexingdemo | | int1demo | | intdemo | | keydemo | | latandlangdemo | | limitoffsetdemo | | milliseconddemo | | modifycolumnnamedemo | | modifydatatype | | moneydemo | | moviecollection | | multipleindexdemo | | multiplerecordwithvalues | | myisamtoinnodbdemo | | mytable | | mytable1 | | newstudent | | nextpreviousdemo | | nonasciidemo | | nthrecorddemo | | nulldemo | | nullwithselect | | numbercolumndemo | | ondemo | | originaltable | | pasthistory | | presenthistory | | primarytable | | primarytable |1 | | primarytabledemo | | qutesdemo | | rowcountdemo | | rownumberdemo | | rowstranspose | | rowstransposedemo | | saveintotextfile | | saveoutputintext | | secondtable | | sequencedemo | | singlequotesdemo | | smallintdemo | | sortingvarchardemo | | sourcetable | | spacecolumn | | student | | studentrecordwithmyisam | | studenttable | | table |1 | | table |2 | | tabledemo | | tbldemotrail | | tblf | | tblfirst | | tblfunctiontrigger | | tblifdemo | | tblp | | tblselectdemo | | tblstudent | | tbluni | | tblupdatelimit | | textdemo | | texturl | | timestampdemo | | trailingandleadingdemo | | transactiondemo | | triggedemo | | trigger1 | | trigger2demo | | trimdemo | | trimdemo2 | | uniqueconstdemo | | uniquedemo | | unsigneddemo | | updtable | | usernameandpassworddemo | | varchardemo | | varchardemo1 | | varchardemo2 | | varcharurl | | whereconditon | | xmldemo | +--------------------------+ 132 rows in set (0.01 sec)
위에서 데이터베이스 비즈니스에서132개 테이블.
테이블의 개수를 확인합니다.
mysql> SELECT count(*) AS TOTALNUMBEROFTABLES -> FROM INFORMATION_SCHEMA.TABLES -> WHERE TABLE_SCHEMA = 'business';
다음 출력은 모든 테이블의 개수를 나타냅니다.
+---------------------+ | TOTALNUMBEROFTABLES | +---------------------+ | 132 | +---------------------+ 1 row in set (0.01 sec)