SQL Query : Faydalı Sql Server Komutları 2

  • Sql Server veri tabanındaki bir tablodaki kolonların listelenmesi ( Getting all column information of the table):
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name=’Table Name’
  • Sql Server veri tabanındaki stored procedure’ler içerisinde son N günde değişenlerin listelenmesi (Getting list of stored procedure modified in last N days):
SELECT name 
FROM sys.objects
WHERE type =’P’ 
AND DATEDIFF(D,modify_date,GETDATE())<; N

Note: N yerine listelenmek istenen gün değerini sayısal olarak giriniz . ( Replace N with any number.)

  • Sql Server veri tabanındaki stored procedure’ler içerisinde son N günde yaratılanların listelenmesi ( Getting a list of stored procedures created in the last N days):
SELECT name 
FROM sys.objects
WHERE type =’P’ 
AND DATEDIFF(D,create_date,GETDATE())<; N

Note: N yerine listelenmek istenen gün değerini sayısal olarak giriniz . ( Replace N with any number.)

No feedback yet
Leave a comment

Your email address will not be revealed on this site.
PoorExcellent
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Array
Trackback address for this post
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Array