[英]How to add rows to a table after the columns were altered? (SQLite, JAVA)
[英]How to find the time of newly created/altered columns of an existing table?
我正在amazon redshift
做一個項目,我需要找到以下 3 點的數據。
- 跨所有模式的表的創建時間
- 創建的表的所有者/用戶
- 另外,現有表[經歷新創建/更改的列]的時間和任何架構更改。
我設法使用系統表pg_class_info
& pg_namespace
[for #1] 和pg_tables
[for #2] 解決了 #1 和 #2,但堅持第 3 點。 有人可以幫我找出實現#3的方法嗎? 請幫忙。
注意:也歡迎對 #1 和 #2 提出更好的建議。
對於第三個要求,沒有直接答案 另一方面,通過查詢系統視圖 STL_QUERY,您可能會找到您要查找的內容
這是示例查詢
select
userid, starttime, querytxt
from STL_QUERY
where querytxt like '%alter%table%'
limit 10;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.