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!

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen. logo

Je reageert onder je account. Log uit /  Bijwerken )

Google photo

Je reageert onder je Google account. Log uit /  Bijwerken )


Je reageert onder je Twitter account. Log uit /  Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit /  Bijwerken )

Verbinden met %s