Sqlserver
 sql >> Teknologi Basis Data >  >> RDS >> Sqlserver

Bagaimana cara menemukan prosedur tersimpan yang berisi ?

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES 
    WHERE ROUTINE_DEFINITION LIKE '%Foo%' 
    AND ROUTINE_TYPE='PROCEDURE'
SELECT OBJECT_NAME(id) 
    FROM SYSCOMMENTS 
    WHERE [text] LIKE '%Foo%' 
    AND OBJECTPROPERTY(id, 'IsProcedure') = 1 
    GROUP BY OBJECT_NAME(id)
SELECT OBJECT_NAME(object_id)
    FROM sys.sql_modules
    WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1
    AND definition LIKE '%Foo%'


  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Cara Menghapus Header Kolom saat Mengirim Hasil Kueri melalui Email di SQL Server (T-SQL)

  2. 3 Cara Mengembalikan String Beberapa Spasi di SQL Server

  3. SQL Server 2016 :Dampak Kinerja Selalu Terenkripsi

  4. Gagal memperbarui database .mdf karena database hanya-baca (aplikasi Windows)

  5. Paket SSIS tidak ingin mengambil metadata dari tabel sementara