Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi How can I return the date a DB was last updated?

In MS (spit) SQL it can be done with

SELECT TOP 1 name, modify_date,
type_desc FROM  sy.sobjects ORDER BY
modify_date DESC

I can see that SQL Anywhere has SysObjects and Type but nothing for the last date modified

asked 03 Jan '19, 13:02

gchq's gravatar image

accept rate: 36%

This FAQ may help.

permanent link

answered 03 Jan '19, 14:04

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%


Thank you for responding.

I believe that FAQ is to query a specific table. I am attempting to query the DB to see which table was last updated and the date

(03 Jan '19, 14:12) gchq
Replies hidden

AFAIK There is no one piece of information that tell you when the database as a whole was last modified but the FAQ is saying that you could query the SYSTAB table and find the times when each of the tables were modified.

For example, extract the timestamp of the last table that was modified and that will be the time that the database was last modified.

select first last_modified_at
  from sys.systab
 order by last_modified_at desc;


(03 Jan '19, 14:32) Mark Culp

Just what I wanted - thank you so much :-)

(03 Jan '19, 18:20) gchq
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 03 Jan '19, 13:02

question was seen: 1,055 times

last updated: 03 Jan '19, 18:20