2012-11-07 87 views

回答

2

要獲取的行數在SQL表使用count(*)功能是這樣的:

select count(*) from Person 

更具體 - 讓數爲C++變量使用:

int count; 
sql << "select count(*) from person", into(count); 
+0

我想那是某種社會方式。但是,謝謝,我會用它 - 簡單而好看!:) –

+0

請記住,雖然這樣做對於一張大桌子來說很貴。 – 2012-11-07 13:21:37

+0

@aleguna:你能提出一個更好的解決方案嗎?有沒有? –

相關問題