SSMS funny feature

As i was teaching a class yesterday, someone asked if you could update records through the GUI. I showed them it is possible, but not advisable. Besides, default you can only edit the first 200 records. If your table contains more, the records just won’t show up.

And that’s where i was wrong, you can alter the default views in SQL Server to show more records! Even though i strongly advise against it, i’ll show you how to change this setting.

First up, click the edit top 200 rows option in your table options menu

Edit me please?

If you’re lucky, you’ll see an extra menu bar appearing at the top of your screen:

new and fancy and cool

There are some features there, but click on the SQL button:

The result

What you see is the query SSMS uses. And, you can edit this!

Less data please

I’ve changed the query to pick up only the first 20 rows. This in itself doesn’t do anything. Close the editor by clicking on the SQL button again and then press the play button:


What happens next is, you only get the first 20 rows from the table.

Trust me, just twenty rows

With the other options in the menu bar, you can add and remove columns, aggregate and do all other kinds of cool stuff if you’re not into typing.

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s