Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Column Count

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2010-02-19 : 05:51:40
After making a new table with 904 columns, how do I simply get a count of those, to verify? Design doesn't show those. select count(*) N/A.

How do I do it?

Thx

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 06:05:16
[code]SELECT count(*) FROM INFORMATIONS_SCHEMA.COLUMNS WHERE Table_Name ='YourTable' AND Table_Schema = 'Your schema name'[/code]

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-02-19 : 06:05:55

select count(*) from information_schema.columns
where table_name='your table'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-02-19 : 06:06:21
Again

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 06:07:36
quote:
Originally posted by madhivanan

Again

Madhivanan

Failing to plan is Planning to fail




------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -