Reputation: 11
I want to draw an ERD, showing the relationship between two tables. Below are their sql queries.
CREATE TABLLE USERS(userid INT PRIMARY KEY, name VARCAHR(20));
CREATE TABLE RATING(userid INT REFERENCES USERS(userid), userid2 INT REFERENCES USERS(userid), number int, PRIMARY KEY(userid, userid2));
Upvotes: 1
Views: 63
Reputation: 11609
Find the screen shot of your ER Diagram:
Some more information/tips:
I am not sure, which RDMS you are using, but if you have access to SQL Server Management studio an ER diagram can be created quickly by below steps:
Upvotes: 1