I'm having trouble writing a function that will take a table variable as an input and return the total number of rows in that table.
Here is my try:
CREATE FUNCTION fTableRows( @table TABLE )
RETURNS INT AS
BEGIN
RETURN( SELECT COUNT(*) FROM @table )
END