Skip to main content
deleted 18 characters in body
Source Link
Pedram
  • 6.6k
  • 11
  • 69
  • 93

MakeCreate below storestored procedure and set short key for that like bottom image,

So next time whenever you want to find a particular text in any of the four objects like Store procedure, Views, Functions and Tables. You just need to write that keyword and press shortshortcut key.

For example: I want to search 'PaymentTable' then write 'PaymentTable' and make sure you select or highlight the written keyword in query editor and press shortshortcut key ctrl+4 - it will provide you full result.

Make below store procedure and set short key for that like bottom image,

So next time whenever you want to find a particular text in any of the four objects like Store procedure, Views, Functions and Tables. You just need to write that keyword and press short key.

For example: I want to search 'PaymentTable' then write 'PaymentTable' and make sure you select or highlight the written keyword in query editor and press short key ctrl+4 - it will provide you full result.

Create below stored procedure and set short key,

So next time whenever you want to find a particular text in any of the four objects like Store procedure, Views, Functions and Tables. You just need to write that keyword and press shortcut key.

For example: I want to search 'PaymentTable' then write 'PaymentTable' and make sure you select or highlight the written keyword in query editor and press shortcut key ctrl+4 - it will provide you full result.

added 58 characters in body
Source Link
Pedram
  • 6.6k
  • 11
  • 69
  • 93

For example: I want to search 'PaymentTable' then write 'PaymentTable' and make sure you select or highlight the written keyword in query editor and press short key ctrl+4 - it will provide you full result.

For example: I want to search 'PaymentTable' then write 'PaymentTable' in query editor and press short key ctrl+4 - it will provide you full result.

For example: I want to search 'PaymentTable' then write 'PaymentTable' and make sure you select or highlight the written keyword in query editor and press short key ctrl+4 - it will provide you full result.

Source Link
Pedram
  • 6.6k
  • 11
  • 69
  • 93

Good practice to work with SQL Server.

Make below store procedure and set short key for that like bottom image,

CREATE PROCEDURE [dbo].[Searchinall] (@strFind AS VARCHAR(MAX)) AS BEGIN SET NOCOUNT ON; --TO FIND STRING IN ALL PROCEDURES BEGIN SELECT OBJECT_NAME(OBJECT_ID) SP_Name ,OBJECT_DEFINITION(OBJECT_ID) SP_Definition FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%'+@strFind+'%' END --TO FIND STRING IN ALL VIEWS BEGIN SELECT OBJECT_NAME(OBJECT_ID) View_Name ,OBJECT_DEFINITION(OBJECT_ID) View_Definition FROM sys.views WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%'+@strFind+'%' END --TO FIND STRING IN ALL FUNCTION BEGIN SELECT ROUTINE_NAME Function_Name ,ROUTINE_DEFINITION Function_definition FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%'+@strFind+'%' AND ROUTINE_TYPE = 'FUNCTION' ORDER BY ROUTINE_NAME END --TO FIND STRING IN ALL TABLES OF DATABASE. BEGIN SELECT t.name AS Table_Name ,c.name AS COLUMN_NAME FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%'+@strFind+'%' ORDER BY Table_Name END END 

Now - Set short key as below,

enter image description here

So next time whenever you want to find a particular text in any of the four objects like Store procedure, Views, Functions and Tables. You just need to write that keyword and press short key.

For example: I want to search 'PaymentTable' then write 'PaymentTable' in query editor and press short key ctrl+4 - it will provide you full result.