Finding the number of columns in a table – SQL Server

It’s been a while since my last post and since then I’ve started a new job. At this new job I have to use Microsoft SQL Server 2008R2 and work with many different database and tables, which I don’t think is uncommon among programmers. While dealing with these tables, some of them with tons of columns (too many to count) I have found the need to see how many columns there are in a specific table since I need to write column specific code for one of the applications. Now, this table had more columns than I wished to count by hand and I was thinking there was a way to do it in SQL and it turns out there is and I’ll share it with you now.

Moving From C# To Java Isn’t So Bad

Since I’ve started the MSCS program at DePaul I have started to do a lot more work with Java and have come to found that it is a great language. The first time I really tried to get involved with it was when I wanted to make an Android app. I found it difficult to understand why it is the way it is. I didn’t like that you had to create a new source file for every public class and the naming conventions were a bit confusing (on the back end…I wasn’t sure what the difference between a Jar and Class file was).

Welcome to the new site…

So I got tired of the old BlogEngine.Net blog engine so I decided to succumb to WordPress and I must say it is quite nice. The problem is that WP doesn’t support BlogML which BlogEngine.Net does. This isn’t as bad considering a lot of posts before weren’t that high quality so I get to re-write them. As I go, I’ll try to add more content to the posts and add new and improved posts. Be on the lookout for a post on C#, .Net 4.0 and Excel Interop!