I want to get the list of last n number of table names present in a schema in a particular database. The problem is there are lots of tables and is not convenient to scroll through all of them to reach the end. Is there a way I can use something equivalent of tail -f command which is used to look at the recent updates in a log file.
I have tried something like tail -f dt in the current schema. But doesn’t work.
3
Answers
This is it:
for example you can replace 5 with any number.
It should be with alias name in sub query
In unix terminal. You can do following.
ending 5 rows. 7 = 5+ row(
table rows count
) + 1(empty new line).print first 5 row.You can
8 = 5 + following 3 meta row.
List of relations
")Schema | Name | Type | Owner
)--------+-------------------------+-------------------+-------
)