Hi Friends,

Ask any SQL DBA for his favorite SQL Server Keyboard Shortcuts and most would reply; ALT + F1. But what has gone wrong now?

Option 1: Select the table name and press ALT + F1.
Result: Doesn’t work.
Error: Msg 15009, Level 16, State 1, Procedure sp_help, Line 66
The object ‘SalesOrderHeader’ does not exist in database ‘AdventureWorks2008R2’ or is invalid for this operation.

1_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Option 2: Select the schema & table name and press ALT + F1.
Result: Doesn’t work.
Error: Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘.’.

2_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Option 3: Enclose the table name in square brackets, Select and press ALT + F1.
Result: Same as option 1

3_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Option 4: Enclose the schema & table name in square brackets, Select and press ALT + F1.
Result: Same as option 2

4_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Option 5: Enclose the schema & table name in single square brackets, Select and press ALT + F1.
Result: Works :)

5_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

But, does the select statement work in case of option 5?

NOOOOOOOOOOO !

6_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Now try all the above 4 options with table DatabaseLog
Result: it all works :)

7_SQL_Server_what_happened_to_the_ amazing_ALT_F1_keyboard_ shortcut

Conclusion:  I am confused 😉 Really?

Well, Databaselog belongs to dbo schema. ALT + F1 shortcut works the way it should work for tables belonging to dbo schema.

Feedback, comments and your observation is welcomed. If you can get it working with other schema, do let us know. I tried all the above in SQL Server 2008 R2. I don’t know who it is like in SQL 2012.