sys.columns(Transact-SQL)sys.columns (Transact-SQL)
적용 대상:Applies to: SQL ServerSQL Server(지원되는 모든 버전)
SQL ServerSQL Server (all supported versions)
Azure SQL DatabaseAzure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
병렬 데이터 웨어하우스Parallel Data Warehouse
병렬 데이터 웨어하우스Parallel Data Warehouse
SQL ServerSQL Server(지원되는 모든 버전)
SQL ServerSQL Server (all supported versions)
Azure SQL DatabaseAzure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
병렬 데이터 웨어하우스Parallel Data Warehouse
병렬 데이터 웨어하우스Parallel Data Warehouse
뷰 또는 테이블과 같이 열을 갖고 있는 개체의 각 열에 대한 행을 반환합니다.Returns a row for each column of an object that has columns, such as views or tables. 다음은 열을 갖고 있는 개체 형식의 목록입니다.The following is a list of object types that have columns:
테이블 반환 어셈블리 함수(FT)Table-valued assembly functions (FT)
인라인 테이블 반환 SQL 함수(IF)Inline table-valued SQL functions (IF)
내부 테이블(IT)Internal tables (IT)
시스템 테이블(S)System tables (S)
테이블 반환 SQL 함수(TF)Table-valued SQL functions (TF)
사용자 테이블(U)User tables (U)
뷰(V)Views (V)
열 이름Column name | 데이터 형식Data type | DescriptionDescription |
---|---|---|
object_idobject_id | intint | 이 열이 속한 개체의 ID입니다.ID of the object to which this column belongs. |
namename | sysnamesysname | 열의 이름입니다.Name of the column. 개체 내에서 고유합니다.Is unique within the object. |
column_idcolumn_id | intint | 열의 ID입니다.ID of the column. 개체 내에서 고유합니다.Is unique within the object. 열 ID는 순차적이지 않을 수 있습니다.Column IDs might not be sequential. |
system_type_idsystem_type_id | tinyinttinyint | 열의 시스템 유형 ID입니다.ID of the system type of the column. |
user_type_iduser_type_id | intint | 열의 유형에 대한 사용자 정의 ID입니다.ID of the type of the column as defined by the user. 형식의 이름을 반환 하려면이 열에 대 한 sys. types 카탈로그 뷰에 조인 합니다.To return the name of the type, join to the sys.types catalog view on this column. |
max_lengthmax_length | smallintsmallint | 열의 최대 길이(바이트)입니다.Maximum length (in bytes) of the column. -1 = 열 데이터 형식이 varchar (max), nvarchar (max), varbinary (max) 또는 xml 입니다.-1 = Column data type is varchar(max), nvarchar(max), varbinary(max), or xml. 텍스트 열의 경우 max_length 값은 16 이거나 ' text in row ' sp_tableoption 값으로 설정 됩니다.For text columns, the max_length value will be 16 or the value set by sp_tableoption 'text in row'. |
정밀도precision | tinyinttinyint | 숫자 기반일 경우에는 열의 전체 자릿수이고, 그렇지 않으면 0입니다.Precision of the column if numeric-based; otherwise, 0. |
소수 자릿수scale | tinyinttinyint | 숫자 기반일 경우에는 열의 소수 자릿수이고, 그렇지 않으면 0입니다.Scale of column if numeric-based; otherwise, 0. |
collation_namecollation_name | sysnamesysname | 문자 기반일 경우에는 열의 데이터 정렬 이름이고, 그렇지 않으면 NULL입니다.Name of the collation of the column if character-based; otherwise, NULL. |
is_nullableis_nullable | bitbit | 1 = 열이 Null 값을 허용합니다.1 = Column is nullable. |
is_ansi_paddedis_ansi_padded | bitbit | 1 = 열이 문자, 이진 또는 variant인 경우 ANSI_PADDING ON 동작을 사용합니다.1 = Column uses ANSI_PADDING ON behavior if character, binary, or variant. 0 = 열이 문자, 이진 또는 variant가 아닙니다.0 = Column is not character, binary, or variant. |
is_rowguidcolis_rowguidcol | bitbit | 1 = 선언된 ROWGUIDCOL 열입니다.1 = Column is a declared ROWGUIDCOL. |
is_identityis_identity | bitbit | 1 = 열에 ID 값이 있습니다.1 = Column has identity values |
is_computedis_computed | bitbit | 1 = 열이 계산 열입니다.1 = Column is a computed column. |
is_filestreamis_filestream | bitbit | 1 = 열이 FILESTREAM 열입니다.1 = Column is a FILESTREAM column. |
is_replicatedis_replicated | bitbit | 1 = 복제된 열입니다.1 = Column is replicated. |
is_non_sql_subscribedis_non_sql_subscribed | bitbit | 1 = 열에 SQL Server 이외 구독자가 있습니다.1 = Column has a non-SQL Server subscriber. |
is_merge_publishedis_merge_published | bitbit | 1 = 병합 게시 열입니다.1 = Column is merge-published. |
is_dts_replicatedis_dts_replicated | bitbit | 1 = SSISSSIS를 사용해 복제된 열입니다.1 = Column is replicated by using SSISSSIS. |
is_xml_documentis_xml_document | bitbit | 1 = 내용이 완전한 XML 문서입니다.1 = Content is a complete XML document. 0 = 내용이 문서 조각 이거나 열 데이터 형식이 xml 이 아닙니다.0 = Content is a document fragment or the column data type is not xml. |
xml_collection_idxml_collection_id | intint | 열의 데이터 형식이 xml 이 고 xml이 입력 된 경우 0이 아닌 값입니다.Nonzero if the data type of the column is xml and the XML is typed. 이 값은 열의 유효성 검사 XML 스키마 네임스페이스가 들어 있는 컬렉션의 ID가 됩니다.The value will be the ID of the collection containing the validating XML schema namespace of the column. 0 = XML 스키마 컬렉션이 없습니다.0 = No XML schema collection. |
default_object_iddefault_object_id | intint | 독립 실행형 개체 sys.sp_bindefault인지 또는 인라인 열 수준 기본 제약 조건에 관계 없이 기본 개체의 ID입니다.ID of the default object, regardless of whether it is a stand-alone object sys.sp_bindefault, or an inline, column-level DEFAULT constraint. 인라인 열 수준 기본 개체의 parent_object_id 열은 테이블 자체에 대한 역참조입니다.The parent_object_id column of an inline column-level default object is a reference back to the table itself. 0 = 기본값이 없습니다.0 = No default. |
rule_object_idrule_object_id | intint | sys.sp_bindrule을 사용하여 열에 바인딩된 독립 실행형 규칙의 ID입니다.ID of the stand-alone rule bound to the column by using sys.sp_bindrule. 0 = 독립 실행형 규칙이 없습니다.0 = No stand-alone rule. 열 수준 CHECK 제약 조건에 대해서는 sys.check_constraints (transact-sql)을 참조 하십시오.For column-level CHECK constraints, see sys.check_constraints (Transact-SQL). |
is_sparseis_sparse | bitbit | 1 = 열이 스파스 열입니다.1 = Column is a sparse column. 자세한 내용은 스파스 열 사용을 참조하세요.For more information, see Use Sparse Columns. |
is_column_setis_column_set | bitbit | 1 = 열이 열 집합입니다.1 = Column is a column set. 자세한 내용은 스파스 열 사용을 참조하세요.For more information, see Use Sparse Columns. |
generated_always_typegenerated_always_type | tinyinttinyint | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 열 값이 생성 되는 시기를 식별 합니다. 시스템 테이블의 열에 대해서는 항상 0입니다.Identifies when the column value is generated (will always be 0 for columns in system tables): 0 = NOT_APPLICABLE0 = NOT_APPLICABLE 1 = AS_ROW_START1 = AS_ROW_START 2 = AS_ROW_END2 = AS_ROW_END 자세한 내용은 Temporal Tables (관계형 데이터베이스)를 참조 하세요.For more information, see Temporal Tables (Relational databases). |
generated_always_type_descgenerated_always_type_desc | nvarchar(60)nvarchar(60) | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 의 값에 대 한 텍스트 설명 generated_always_type (시스템 테이블의 열에 대해 항상 NOT_APPLICABLE)Textual description of generated_always_type 's value (always NOT_APPLICABLE for columns in system tables) NOT_APPLICABLENOT_APPLICABLE AS_ROW_STARTAS_ROW_START AS_ROW_ENDAS_ROW_END |
encryption_typeencryption_type | intint | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 암호화 유형:Encryption type: 1 = 결정적 암호화1 = Deterministic encryption 2 = 임의 암호화2 = Randomized encryption |
encryption_type_descencryption_type_desc | nvarchar (64)nvarchar(64) | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 암호화 유형 설명:Encryption type description: 임의RANDOMIZED DETERMINISTICDETERMINISTIC |
encryption_algorithm_nameencryption_algorithm_name | sysnamesysname | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 암호화 알고리즘의 이름입니다.Name of encryption algorithm. AEAD_AES_256_CBC_HMAC_SHA_512만 지원 됩니다.Only AEAD_AES_256_CBC_HMAC_SHA_512 is supported. |
column_encryption_key_idcolumn_encryption_key_id | intint | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. CEK의 ID입니다.ID of the CEK. |
column_encryption_key_database_namecolumn_encryption_key_database_name | sysnamesysname | 적용 대상: SQL Server 2016(13.x)SQL Server 2016 (13.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2016(13.x)SQL Server 2016 (13.x) and later, SQL DatabaseSQL Database. 열의 데이터베이스와 다른 경우 열 암호화 키가 있는 데이터베이스의 이름입니다.The name of the database where the column encryption key exists if different than the database of the column. 키가 열과 동일한 데이터베이스에 있으면 NULL입니다.NULL if the key exists in the same database as the column. |
is_hiddenis_hidden | bitbit | 적용 대상: SQL Server 2019 (15.x)SQL Server 2019 (15.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2019 (15.x)SQL Server 2019 (15.x) and later, SQL DatabaseSQL Database. 열이 숨겨져 있는지 여부를 나타냅니다.Indicates if the column is hidden: 0 = 일반, 숨김, 표시 열0 = regular, not-hidden, visible column 1 = 숨겨진 열1 = hidden column |
is_maskedis_masked | bitbit | 적용 대상: SQL Server 2019 (15.x)SQL Server 2019 (15.x) 이상, SQL DatabaseSQL Database.Applies to: SQL Server 2019 (15.x)SQL Server 2019 (15.x) and later, SQL DatabaseSQL Database. 열이 동적 데이터 마스킹에 의해 마스킹 되는지 여부를 나타냅니다.Indicates if the column is masked by a dynamic data masking: 0 = 일반, 마스크 되지 않은 열0 = regular, not-masked column 1 = 열이 마스킹 됨1 = column is masked |
권한Permissions
사용자가 소유하고 있거나 사용 권한을 부여 받은 보안 개체에 대해서만 카탈로그 뷰의 메타데이터를 볼 수 있습니다.The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. 자세한 내용은 Metadata Visibility Configuration을 참조하세요.For more information, see Metadata Visibility Configuration.
참고 항목See Also
Transact-sql)(시스템 뷰 System Views (Transact-SQL)
개체 카탈로그 뷰 (Transact-SQL) Object Catalog Views (Transact-SQL)
카탈로그 뷰(Transact-SQL) Catalog Views (Transact-SQL)
SQL Server 시스템 카탈로그 쿼리 FAQ Querying the SQL Server System Catalog FAQ
Transact-sql)sys.all_columns ( sys.all_columns (Transact-SQL)
Transact-sql)(tem_columnssys.syssys.system_columns (Transact-SQL)