word count a user

1

Please login or register to vote for this query.

(click on this box to dismiss)

English Language Learners

Q&A for speakers of other languages learning English

DECLARE @RowCount INT

SET @RowCount = (SELECT COUNT(id) 
FROM posts
WHERE posts.OwnerUserId = 9872)

DECLARE @I INT
SET @I = 1

WHILE (@I <= @RowCount)
BEGIN
SELECT @I
SET @I = @I  + 1
END

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results