In SQL SERVER
DECLARE @Count INT
SET @COUNT = SELECT COUNT(*) FROM SomeTable
insert into newTable (fieldName) values (@Count)
OR
INSERT INTO newTable (fieldName)
SELECT COUNT(*) FROM SomeTable
ydobonmai
2010-03-16 14:03:54