Q:

How to create a stored procedure to delete full data from dynamic table

I'm trying to create a stored procedure to delete all data from dynamically selected tables.
I used this code, but it's not working. Any suggestion?
CREATE PROCEDURE spDynamicDeleteTable
    @table NVARCHAR(100)
AS
BEGIN
    DECLARE @Sql NVARCHAR(MAX)

    SET @Sql= 'DELETE FROM'+ @table
    EXECUTE sp_executesql @Sql
END

A:

You are missing a space.
Set @Sql= 'Delete from'+ @table

would become 
Delete fromelbat

if @table = 'elbat'. That isn't valid syntax.
Add a space after "from". It's also advisable to use quotename() to prevent funny things from happen with unusual table names.
Set @Sql= 'Delete from ' + quotename(@table)

Some further notes:

@table should better be declared as a sysname rather than nvarchar(100). sysname is a type extra for object names.
Be aware, that you have to take great care regarding the rights this stored procedure is executed with in order to prevent it from being abused to delete arbitrary data. 

