¾È±Ô °øºÎ¹æ

MS-SQL > INFORMATION_SCHEMA.COLUMNS , columns - Å×À̺íÀÇ Çʵå Á¤º¸¸¦ »Ì¾Æº¸ÀÚ

µî·ÏÀÏ : 2017-07-03 19:52 Á¶È¸¼ö : 52,281

1. INFORMATION_SCHEMA.COLUMNS
 
SELECT Column_Name Çʵå,'' Çʵå¸í,UPPER(Data_Type) ŸÀÔ,  
		CASE WHEN    Data_Type   = 'Numeric' THEN    CAST(5 AS VARCHAR) + '(' + CAST(Numeric_Precision AS VARCHAR) + ')'  
			ELSE    ISNULL(CAST(Character_Maximum_Length AS VARCHAR),'')  END Å©±â,  
		CASE   WHEN    IS_Nullable = 'Yes' THEN    'Null'  
		ELSE   '' END [Null ¿©ºÎ]  
			FROM INFORMATION_SCHEMA.COLUMNS  
				WHERE Table_Name = 'board'  
					ORDER BY Ordinal_Position  



2. syss.columns
 

	SELECT OBJECT_NAME(object_id) Å×À̺í,name Ä÷³,TYPE_NAME(system_type_id) ŸÀÔ,
		max_length Å©±â, precision Á¤¹Ðµµ, CASE WHEN is_nullable = 1 THEN 'NULL' ELSE 'NOT NULL' END NullÇã¿ë¿©ºÎ
		FROM    sys.columns
		   WHERE   OBJECT_NAME(object_id) = N'board'



¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.