2013-05-15から1日間の記事一覧

テーブルごとの行数を出す

SQLServerの話。 userというテーブル名をもつテーブルを曖昧検索してそれぞれの行数を出すSQL。 select o.name, i.rows from sysindexes i, sysobjects o where o.xtype = 'U' and o.id = i.id and i.indid and o.name LIKE '%user%'