SQLQueryCount

 

SQLConnect로 연결한 데이터베이스에서 조건절을 만족하는 레코드의 개수를 읽어온다. SQLGetCount는 SQLSelect후 사용하지만 SQLQueryGetCount는 SQLSelect없이 빠르게 데이터베이스의 조건을 만족하는 개수를 읽어올 수 있다.

 

int @SQLQueryCount(int id, string table, string where);

 

함수인자

int id : SQLConnect로 연결한 연결 번호

string table : 질의할 테이블 명

string where : 검색할 조건

 

반환 값

읽어온 레코드의 개수가 반환된다.

 

예제

count = @SQLQueryCount(id,"Table1","Name='abc'");

 

문장설명 : Table1에서 Name이 'abc'인 조건을 만족하는 레코드의 개수를 읽어온다.

 

관련항목

SQLConnect()

SQLCreateTable()

SQLDelete()

SQLDisconnect()

SQLExecute()

SQLFirst()

SQLInsert()

SQLLast()

SQLNext()

SQLPrepare()

SQLPrev()

SQLGetCount()

SQLSelect()

SQLSetPos()

SQLUpdate()

 

버전 정보

버전 8.5.0 부터 지원