total number of column name specified in table

Posted by Mcamkumaran under Sql Server on 3/18/2010 | Views : 1612 | Status : [Member] | Replies : 4
i want to know about the how many nummber or column name specified

i know the total number of records in same table 2 billion record is possible (maximum)

regards
MuthuKumaran

MuthuKumaran.R
Senior Software Engineer
Techcello
India.



Responses

Posted by: Ghousal on: 3/18/2010 [Member] Starter

Up
0
Down
Hi,
http://www.geekinterview.com/question_details/37215

Regards
ghousal.

Mcamkumaran, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 3/18/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Look at this

http://www.dotnetfunda.com/interview/exam610-the-maximum-number-of-columns-a-table-can-have-in-sql-server-.aspx

Thank you for posting at Dotnetfunda
[Administrator]

Mcamkumaran, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ghousal on: 3/18/2010 [Member] Starter

Up
0
Down
hi,

http://chiragrdarji.wordpress.com/2010/03/06/sql-server-maximum-columns-in-table-maximum-columns-in-group-by-cluster-index-per-table-max-database-size-maximum-characters-in-ntext-nvarcharmax-and-all-maximum-in-sql-server/

regards
ghousal

Mcamkumaran, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandians on: 3/18/2010 [Member] [MVP] Silver

Up
0
Down
1. A table can have 1024 columns (Maximum), How to proove It ?
DECLARE @intColumns	INT	,

@varSQL NVARCHAR(MAX)

SELECT @intColumns = 1,
@varSQL = N'CREATE TABLE TB_TABLE1('

WHILE(@intColumns <= 1025)
BEGIN
SELECT @varSQL = @varSQL + 'Col' + CAST(@intColumns AS VARCHAR) + ' INT, '
SELECT @intColumns = @intColumns + 1
END

SELECT @varSQL = @varSQL + ')'

EXEC(@varSQL)
/*
Msg 1702, Level 16, State 1, Line 1
CREATE TABLE failed because column 'Col1025' in table 'TB_TABLE1' exceeds the maximum of 1024 columns.*/

2. How many columns are there in a Table :
SELECT COUNT(1) 'No of Column(s)' FROM SYS.SYSCOLUMNS WHERE ID = OBJECT_ID('TableName')

Cheers


Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Mcamkumaran, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response