Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Create a Table in a SQL Server Database?

(image) Hey, Scripting Guy! How can I create a table in a SQL Server database?-- FD(image) (image) (image) Hey, FD. And thanks: you’ve saved the Scripting Guys! Or, at any rate, you’ve saved the Scripting Guy who writes this column. As it turns out, this Scripting Guy is getting ready to leave town and attend his nephew’s wedding. ...

How Can I Tell Whether a Specified Table Exists in a SQL Server Database?

(image) Hey, Scripting Guy! How can I tell whether a specified table exists in a SQL Server database?-- LL(image) (image) (image) Hey, LL. Well, as it turns out it’s absolutely impossible to tell whether a specified table exists in a SQL Server database. So, sorry, time to go back to watching the Major League Baseball playoffs. By the ...

How Can I Get a List of All the Databases on a SQL Server Computer?

(image) Hey, Scripting Guy! How can I get a list of all the databases on a SQL Server computer?-- ER(image) (image) (image) Hey, ER. Before we answer your question, we’d like to take a moment to offer our opinions on all the major – and controversial – issues of the day. We can do that because the Scripting Editor is on vacation and...