我想知道使用DataType的SQL结果集 [英] I want to know the SQL result set with DataType

查看:61
本文介绍了我想知道使用DataType的SQL结果集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL结果集与asp.net不匹配,但我无法找到不匹配的数据类型,你可以帮我找到它。



我想知道带有SQL结果的数据类型。

SQL result set is not match with asp.net, but I can't able to find the mismatch datatype, can you help me to find it.

I want to know the data type with SQL result.

推荐答案

为什么不手动检查选择列表中存在的列的数据类型?这将是最简单的方法。

我认为没有任何直接的方法来了解结果中列的数据类型。但您可以通过以下查询找到表的列数据类型

Why don't you check manually the datatypes of the columns those are present in the select list? That would be the simplest way to do this.
I don't think there is any direct way to know the datatype of the columns in the result. But you can find the datatype of columns a table by following query
SELECT Col.NAME [COL NAME],Typ.NAME [DATA TYPE]
FROM SYS.COLUMNS Col
INNER JOIN SYS.TYPES Typ ON Col.USER_TYPE_ID = Typ.USER_TYPE_ID
WHERE Col.OBJECT_ID = OBJECT_ID('YourTableName')





希望,它有帮助:)



Hope, it helps :)


这篇关于我想知道使用DataType的SQL结果集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆