What's changed recently?

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

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

    SELECT TOP 22 * FROM sysobjects ORDER BY refdate DESC

  • 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

  • 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

  • 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

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

  • Short and sweet!:-)

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

  • 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;

  • What a great little script, thanks.

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

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