home *** CD-ROM | disk | FTP | other *** search
- CREATE VIEW SO.rowcount (num_rows, table_name) AS
- SELECT t.count, t.table_name FROM systable t, sysuserperm p
- WHERE t.creator = p.user_id AND p.user_name = 'SO'
-
-
- Alternatively
- Find user_id from sysuserperm
- SELECT user_id FROM sysuserperm WHERE user_name = 'SO'
-
- Then use a simpler view
- CREATE VIEW SO.rowcount (num_rows, table_name) AS
- SELECT count, table_name FROM systable
- WHERE creator = [user_id]
-
- Replace [user_id] with the value you got in the statement above.
- In databases created by us, this is always 4