SQL Server has some T-SQL Metadata Functions to allow you to get information on your database objects.
A coworker of mine used COL_LENGTH in a script, to test if a column already existed before he tried to add the column to a table:

IF COL_LENGTH('dbo.TestTable', 'TestColumn') IS NULL
    ALTER TABLE dbo.TestTable ADD TestColumn VARCHAR(10) NULL
GO

The function will return a number of the maximum number of bytes stored in a column, but it will return NULL if the column does not exist.
This gives you a shortcut, instead of having to query a system table to see if a column already exists.

There’s a few other metadata functions that are useful as well. A lot of these use the object_id value, which you have probably seen in sys.objects. Databases and schemas have their own IDs as well, which you can see in sys.databases and sys.schemas.

OBJECT_NAME (object_id) – Will return the name (not including schema) for the object with the specified object_id. This will search in the current database.

OBJECT_SCHEMA_NAME (object_id) – Will return the schema name for the object with the specified object_id.

For both of the object name functions, you can also add a 2nd optional parameter with the database ID, to search in a different database.

SCHEMA_NAME (schema_id) and DB_NAME (database_id) return the schema and database names, respectively.

As you would guess, there are functions to get the object ID from the name.

OBJECT_ID, SCHEMA_ID, DB_ID

For OBJECT_ID, you pass in a string with the name of the object that you want the ID for. You can schema qualify the name (‘dbo.TestTable’), and you can also add the database name to search in a different database (TestDB.dbo.TestTable).

I haven’t run into many situation where I need an object ID, but getting the object ID from a name can be useful to see if an object exists, like we saw in the T-SQL example.