C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Find number of columns in a Database Table


Posted Date: 22 Mar 2007    Resource Type: Code Snippets    Category: SQL

Posted By: kumar       Member Level: Diamond
Rating:     Points: 10



This sample shows how to write a SQL Query to find the number of columns in a database table.



SELECT count(column_name) from Information_schema.columns where table_name ='Categories'





Responses

Author: siva    19 May 2008Member Level: Silver   Points : 2
SELECT count(Column_Name) from Information_schema.columns where Table_Name =@Table_Name


Author: vijetha    20 May 2008Member Level: Gold   Points : 2
this query is very good ,i tried this lot of times ,but i never got a solution ,thanks for giving the solution


Author: kumar    04 Jun 2008Member Level: Diamond   Points : 1
Hi Vijetha,

thanx and ur feedback and suggestions are very precious

Pls do post the feedback

thanks and regards,
Kumar


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Fetch data from database in Random order
Previous Resource: Retrieving Xml Data from an Xml Column using XQuery query method
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use