This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Groovy and the fly likes How to get column datatype in groovy sql? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Languages » Groovy
Bookmark "How to get column datatype in groovy sql?" Watch "How to get column datatype in groovy sql?" New topic
Author

How to get column datatype in groovy sql?

Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
hi all,

how to get column data types using groovy sql?


regards,
nazeer
Nazeer Ahammad
Ranch Hand

Joined: Feb 26, 2012
Posts: 43
i have used below code to resolve my problem

sql.rows(query) { meta ->
colDataType = (1..meta.columnCount).collect {
meta.getColumnTypeName(it)
}
}
 
GeeCON Prague 2014
 
subject: How to get column datatype in groovy sql?