SqlServer中常常搞不清楚 sp_columns来看一看
The sp_columns catalog stored procedure is equivalent to SQLColumns in ODBC. The results returned are ordered by TABLE_QUALIFIER, TABLE_OWNER, and TABLE_NAME.
Column name | Data type | Description |
---|---|---|
TABLE_QUALIFIER | sysname | Object qualifier name. This field can be NULL. |
TABLE_OWNER | sysname | Object owner name. This field always returns a value. |
TABLE_NAME | sysname | Object name. This field always returns a value. |
COLUMN_NAME | sysname | Column name, for each column of the TABLE_NAME returned. This field always returns a value. |
DATA_TYPE | smallint | Integer code for ODBC data type. If this is a data type that cannot be mapped to an ODBC type, it is NULL. The native data type name is returned in the TYPE_NAMEcolumn. |
TYPE_NAME | sysname | String representing a data type. The underlying DBMS presents this data type name. |
PRECISION | int | Number of significant digits. The return value for the PRECISION column is in base 10. |
LENGTH | int | Transfer size of the data.1 |
SCALE | smallint | Number of digits to the right of the decimal point. |
RADIX | smallint | Base for numeric data types. |
NULLABLE | smallint | Specifies nullability.
1 = NULL is possible. 0 = NOT NULL. |
REMARKS | varchar(254) | This field always returns NULL. |
COLUMN_DEF | nvarchar(4000) | Default value of the column. |
SQL_DATA_TYPE | smallint | Value of the SQL data type as it appears in the TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for the datetime and SQL-92 intervaldata types. This column always returns a value. |
SQL_DATETIME_SUB | smallint | Subtype code for datetime and SQL-92 interval data types. For other data types, this column returns NULL. |
CHAR_OCTET_LENGTH | int | Maximum length in bytes of a character or integer data type column. For all other data types, this column returns NULL. |
ORDINAL_POSITION | int | Ordinal position of the column in the object. The first column in the object is 1. This column always returns a value. |
IS_NULLABLE | varchar(254) | Nullability of the column in the object. ISO rules are followed to determine nullability. An ISO SQL-compliant DBMS cannot return an empty string.
YES = Column can include NULLS. NO = Column cannot include NULLS. This column returns a zero-length string if nullability is unknown. The value returned for this column is different from the value returned for the NULLABLE column. |
SS_DATA_TYPE | tinyint | SQL Server data type used by extended stored procedures. For more information, see Data Types (Transact-SQL). |
1 For more information, see the Microsoft ODBC documentation.
SqlServer中常常搞不清楚 sp_columns来看一看的更多相关文章
- 常常搞不清楚SQLServer中的sp_columns来看一看
The sp_columns catalog stored procedure is equivalent to SQLColumns in ODBC. The results returned ar ...
- SQLSERVER中的假脱机spool
SQLSERVER中的假脱机spool 我发现网上对于假脱机的解释都非常零散,究竟假脱机是什么? 这几天在家里研究了一下,收集了很多网上的资料 假脱机是中文的翻译,而英文的名字叫做 spool 在徐老 ...
- 我是如何在SQLServer中处理每天四亿三千万记录的
首先声明,我只是个程序员,不是专业的DBA,以下这篇文章是从一个问题的解决过程去写的,而不是一开始就给大家一个正确的结果,如果文中有不对的地方,请各位数据库大牛给予指正,以便我能够更好的处理此次业务. ...
- SQLSERVER中的ALL、PERCENT、CUBE关键字、ROLLUP关键字和GROUPING函数
SQLSERVER中的ALL.PERCENT.CUBE关键字.ROLLUP关键字和GROUPING函数 先来创建一个测试表 USE [tempdb] GO )) GO INSERT INTO [#te ...
- 【转】我是如何在SQLServer中处理每天四亿三千万记录的
原文转自:http://blog.jobbole.com/80395/ 首先声明,我只是个程序员,不是专业的DBA,以下这篇文章是从一个问题的解决过程去写的,而不是一开始就给大家一个正确的结果,如果文 ...
- SQLSERVER中如何快速比较两张表的不一样
SQLSERVER中如何快速比较两张表的不一样 不知不觉要写2014年的最后一篇博文了~ 一般来说,如何检测两张表的内容是否一致,体现在复制的时候发布端和订阅端的两端的数据上面 我这里罗列了一些如何从 ...
- 知方可补不足~sqlserver中触发器的使用
回到目录 触发器在过去的10年中,即存储过程和ado.net称霸江湖期间是那么的重要,而现在,trigger显得不是那么必要的,我们很少将复杂的业务写在SQL里,当然也会没有机会写到trigger里了 ...
- SQLServer中的死锁的介绍
简介 什么是死锁? 我认为,死锁是由于两个对象在拥有一份资源的情况下申请另一份资源,而另一份资源恰好又是这两对象正持有的,导致两对象无法完成操作,且所持资源无法释放. 什么又是阻塞? 阻塞是 ...
- XML 在SQLServer中的使用
SQL Server对于XML支持的核心在于XML数据的格式,这种数据类型可以将XML的数据存储于数据库的对象中,比如variables, columns, and parameters.当你用XML ...
随机推荐
- 大数据自学4-Hue集成环境中各模组说明
前面已经学习了如何将数据从关系型数据库导入到Hive/HDFS,并且在Windows客户端查询导入的数据,接下来继续学习CDH,知识点: 1.Hue环境中DB Query如何使用,DB Query这个 ...
- Kattis之旅——Factovisors
The factorial function, n! is defined thus for n a non-negative integer: 0! = 1 n! = n * (n-1)! (n & ...
- sqlalchemy多对多查询
# coding:utf-8 from sqlalchemy import create_engine, Column, String, Integer, ForeignKey, Table from ...
- rabbitmq集群故障恢复详解
RabbitMQ的mirror queue(镜像队列)机制是最简单的队列HA方案,它通过在cluster的基础上增加ha-mode.ha-param等policy选项,可以根据 需求将cluster中 ...
- python之路-day1-while循环
while Thue: (条件为真无限循环) break(跳出循环) 猜年龄: #Author:zwwage_of_jay = 40count = 0while count < 3: gues ...
- 如何写好接口(php写app移动端接口示例)
原文链接:https://blog.csdn.net/xwh670570759/article/details/52130585?utm_source=blogxgwz0
- vscode中live server插件的Go Live不显示问题
vscode 的 live server 插件是一个很好用的插件,它会帮使用者自动开启一个服务器,保存的时候便自动刷新浏览器页面 安装完便在 vscode 右下方显示如图 Go Live 字样,点击便 ...
- Elasticsearch-->Get Started--> Exploring Your Data
Exploring Your Data Sample Dataset Now that we’ve gotten a glimpse of the basics, let’s try to work ...
- activiti 5.13流程图连线名称不显示bug修复
使用modeler设计器,流程图连线名称是有显示的,但是运行结果却没显示.找到网上2遍文章,说是activiti框架中的一个bug,要修改 DefaultProcessDiagramGenerator ...
- BZOJ 4159 [Neerc2009]Business Center
思路 简单的模拟,答案就是\(min\{(\lfloor\frac{d\times n}{u+d}\rfloor+1)\times(u+d)-d\times n\}\) 代码 #include < ...