Selasa, 16 Februari 2016

Mencari Object database (Tabel, Store Procedure, View, Function) lewat Query


Mencari Object database (Tabel, Store Procedure, View, Function) lewat Query:
Mencari Tabel

" SELECT * FROM sys.Tables WHERE name like '%%' "

Mencari Store Procedure

" SELECT * FROM sys.procedure where name like '%%' "

Mencari View

" SELECT * FROM sys.views where name like '%%' "

Mengurutkan tabel berdasarkan tanggal modifikasi terakhir

" SELECT * FROM sys.Tables WHERE name like '%%' order by modify_date DESC "

Mengurutkan Store Procedure berdasarkan tanggal modifikasi terakhir

" SELECT * FROM sys.procedure where name like '%%' order by modify_date DESC "

Mengurutkan View berdasarkan tanggal modifikasi terakhir

" SELECT * FROM sys.views where name like '%%' order by modify_date DESC "

Mengurutkan tabel berdasarkan tanggal Pembuatan terbaru
" SELECT * FROM sys.Tables WHERE name like '%%' order by create_date DESC "

Mengurutkan Store Procedure berdasarkan tanggal Pembuatan terbaru

" SELECT * FROM sys.procedure where name like '%%' order by create_date DESC "

Mengurutkan View berdasarkan tanggal Pembuatan terbaru

" SELECT * FROM sys.views where name like '%%' order by create_date DESC "
Note: bila ingin dirubah berdasarkan urutan terlama, DESC diganti dengan ASC

Demikian tips dari saya.

0 komentar:

Posting Komentar