65.9K
CodeProject is changing. Read more.
Home

SELECT * FROM, sp_helptext ShortCut for SQL Query Analyzer

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.77/5 (9 votes)

Jun 12, 2006

viewsIcon

82368

A Key ShortCut for 'SELECT * FROM' for tables and to see text of the stored procedures.

Introduction

For them, who are fed up of typing 'SELECT * FROM' for tables for which they want
to retrieve the data and want to see text of the stored procedures.

1. Create following procedure in your working database / or master database if you have the permission and give EXECUTE permission to other Roles/Users.

CREATE PROC sp_SelectFromTable @tbl VARCHAR (128)
AS
EXEC ('SELECT * FROM ' + @tbl )
GO

Now open SQL Query Analyzer >> Tools >> Customize >> Custom Tab type sp_SelectFromTable against Ctrl+3 (or whatever shortcut key you like to choose )

To use above Key shortcut -
Type any table name in your database, select the table name and say Ctrl+3


2. Make a short cut key for seeing the text of Stored Procedure.
open SQL Query Analyzer >> Tools >> Customize >> Custom Tab
type sp_helptext against Ctrl+4 (or whatever shortcut key you like to choose )

To use above Key shortcut -
Type any Stored Procedure name in your database, select the SP name and say Ctrl+4.

These are small but may be useful for SQL Query Analyzer users.