This question already has an answer here:
- Map database type to concrete Java class 2 answers
I am using SQL Server. My table has a column with the data type datetime2
.
I am accessing the table data using ResultSet
. I need to get the data type of a column. The method rs.getColumnTypeName()
returns nvarchar
for database data type datetime2
.
Is there any way to get datetime2
or Timestamp
for the same?