barry555's script is just a starting point, it does not consider foreign keys on multiple columns, or several relations between two tables, it will mostly give wrong results
i found a better way to 'Generate Index for Foreign Keys' at sqlservercentral itself while searching
http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1079
i will be analyzing this script and comparing results, at first read is seems that already existing indexes are also included in the output, which when executed will result in errors
i needed a query editor With Intellisense, sqlprompt failed as it is functions very erratically, any suggessions