Skip to main content

Hello I need assistance with the export to SQL feature for my ERD. I saw this feature in a Lucidchart YouTube video and I've been looking for it but I can't seem to find it. When I open the shapes section the only option I am seeing under ERDs is "import" but no export. Was the feature removed or maybe I'm just not looking in the right place?

Hi Shamapumbu

Thanks for posting in the community! To see the steps to export your ERD to SQL check out the Export to SQL section of our Entity Relationship Diagrams (ERDs) article. Please feel free to let me know if you have any further questions!


Hello Abby S 


Could you please answer the question from Shamapumbu above?


I have the same question and the link you sent does not help at all. 


Thanks


Hey Anelia


The steps for exporting your ERD to SQL as outlined in the article Abby linked above are as follows:


Export your ERD to the DBMS of your choice (with the exception of connections between tables).


To export your entire page:



  1. In the Entity Relationship shape library found in the Toolbox click “Export.”


  2. A dialog will appear. Choose your DBMS from the menu. The text field below will produce the correct statement for the entire page.



Hope this helps! If you have any additional questions feel free to post them below. Thanks!


I have similar trouble not finding the export button you are talking about in your explanation. There is simply no export button under the ERD icons. Can you confirm that the export to sql functionality is still supported. And WHERE is the feature? thx Timo


Hi @timo e 


Thank you for continuing this thread. The export functionality can be found in the Entity Relationship shape library as shown here.


Please Note: You will need to have this library selected as one of your shape libraries to see the export option. 


Additionally you can access the export function from the context panel. To open the context panel select one of the Entity Relationship shapes on your diagram. The panel shown below will then open on the right hand side.


Please let me know if you have any additional questions!


While what Lucidchart is exporting here falls in the category of SQL it's more specifically DDL (data definition language) which is in Wikipedia at https://en.wikipedia.org/wiki/Data_definition_language. I like this export feature but I would benefit from a new related option. It would be great if Lucidchart really did export the SQL. Specifically rather than a CREATE TABLE statement I need the SELECT * FROM [Lucidchart fills in this part] WHERE 1=1 statement. This would be amazing to use to validate the accuracy of my ERD.


I just submitted the Product Feedback/Feature Request and am just making a public comment about it here. Since you've already got the logic to translate the diagram into DDL I would think (hope) this would be a piece of cake to translate to SQL. I emailed my account rep Tiffani L and she recommended I bring this up to the community.


As a side note Microsoft Access and SAP Business Objects Universe Designer do this already. For example in Access if you draw the relationships in the "relationships window" then use the query wizard and make a query from the two tables you drew a relationship between Access writes the SQL for you based on nothing other than what you drew in the relationships window. Pretty straightforward. That's what I'd like Lucidchart to do too. (Reference https://support.microsoft.com/en-us/office/what-is-the-relationships-window-20c66348-854f-47f8-819a-5cce2518ee1d and https://support.microsoft.com/en-us/office/create-a-simple-select-query-de8b1c8d-14e9-4b25-8e22-70888d54de59.) I'm of course not asking to make Lucidchart into a full SQL writing tool. I just would like Lucidchart to automate the manual step of typing up correct SQL which would be reasonably interpreted from the drawing I just made.


As context the ERD I always draw have relationship lines directly from column-to-column as shown in the blue tables on https://www.lucidchart.com/pages/er-diagrams not the table-to-table relationships shown in the red tables.



If you'd find this helpful too then please comment!


Hi David 


We really appreciate you posting this in the community as well as proactively submitting a feature request! This kind of feedback is certainly valuable to our development teams here at Lucid but also a great way to provide visibility to other users who may run into this same scenario while working with our SQL features. 


If any other users who see this post would like to add any additional details please feel free to continue this thread and we will pass it along to the appropriate teams! 


Reply