What's changed recently?

  • ianstirk

    Ten Centuries

    Points: 1310

    Comments posted to this topic are about the item What's changed recently?

  • Tee Time

    Hall of Fame

    Points: 3693

    SQL 2000, at least from what I can determine would be.

    SELECT TOP 22 * FROM sysobjects ORDER BY refdate DESC

  • webrunner

    SSC-Dedicated

    Points: 30254

    Thanks for this! But why select the top 22 only?

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • ianstirk

    Ten Centuries

    Points: 1310

    Hi

    Typically only a small number of rows have changed recently (unless there's been a table defrag), I want a small number of rows, so 22 seems appropriate... 11 or 33 etc are also good 🙂

    Ian

  • webrunner

    SSC-Dedicated

    Points: 30254

    ianstirk (11/16/2014)


    Hi

    Typically only a small number of rows have changed recently (unless there's been a table defrag), I want a small number of rows, so 22 seems appropriate... 11 or 33 etc are also good 🙂

    Ian

    Ah, OK - thanks! 🙂

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • AVX

    Old Hand

    Points: 391

    IS SQL 2012, add "where object_id > 0" to exclude temporary objects

  • MyDoggieJessie

    SSC-Forever

    Points: 44278

    Short and sweet!:-)

    ______________________________________________________________________________
    Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • jonas.gunnarsson 52434

    Ten Centuries

    Points: 1226

    Object schema is sometimes good to know.

    select "Schema" = object_schema_name(so.object_id), * from sys.objects as so

    where so.modify_date > dateadd(month, -2, getdate()) and so.object_id > 0

    order by "Schema", so.modify_date desc;

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    What a great little script, thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply