How To Get the Publication Name of a Replicated Table

When replication is configured for too many tables, it might be sometime time taking to search for the publication name when you want to do some alteration.

Below is small piece of code which will give you the publication name for required table.

SELECT spub.name as [Publication_Name],
sart.name as [TableName],
sart.dest_table as [DestinationTable_Name] FROM
syspublications spub 
INNER JOIN
sysarticles sart ON spub.pubid = sart.pubid
WHERE sart.name ='YourTableName'