# Miscellaneous > SQL Scripts >  A script or a code to give me all the entity relations of my database

## Aohene

Hi,

I would be grateful if you could point me to a SQLserver script that will give me the "Entity Relation Diagram" of my database. 

Thanks in advance.

Regards,

Albert

----------


## rmiao

Don't know any script that can generate relation diagram, but can try sp_pkeys and sp_fkeys for table relation info.

----------


## MAK

Use any tool like ERWIN or ER studio and point to any database and do reverse engineer.

----------

