How do you access the value of an SQL count () query in a Java program

前端 未结 7 1142
梦毁少年i
梦毁少年i 2021-02-01 00:54

I want to get to the value I am finding using the COUNT command of SQL. Normally I enter the column name I want to access into the getInt() getString() method, what do I do in t

相关标签:
7条回答
  • 2021-02-01 01:17

    I would expect this query to work with your program:

    "SELECT COUNT(*) AS count FROM "+lastTempTable+")"

    (You need to alias the column, not the table)

    0 讨论(0)
提交回复
热议问题