Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これが私の簡略化された表です(SQL Server 2005):
table1: col1 int, col2 int, col3 cast(col1/col2 as int) [computed column]
何らかの理由で上記が機能しません。col1/col2 の全体を保存したいのですが、どうすればいいですか?
example: col1 = 5, col2 = 3 ... col3 should be 1
1 つのオプションは、フロア関数を使用することです。
FLOOR(列1/列2)
また
CONVERT(int, FLOOR(col1/col2)) -- やり過ぎかもしれません