After my blogs about “SQL Server 2025: Local SQL Server Container without Docker Command” and “SQL Server 2025: Local SQL Server Container – Schema compare preview”, I continue to play & test it.
One new feature in preview is the “Schema Design compare” in this last MSSQL extension for Visual Studio Code:

Let’s start and see on a database (db2 in my example):

Et voila, I have my 2 tables created during the test on Schema Compare blog here

Now, I create a new table t3 with some columns:

Very easy to create a table without being a SQL Expert.
As you can see, you have easily access to the option and add some specific input like the size or a default value.
The table t3 is created with a primary key on column c1.
Now, I change my table t2 and want to put c1 as primary key.

To edit the table t2, just click on the pen:

In the edit table, I just check the column c1 as primary key:

And I have my primary key on table t2:

Now, I want do link between my 3 tables (this is named/known as a Foreign Key…)
First between t2 and t3, I go the side of the table t2 and a blue point appears. Take it and go to the table t3


Let’s try between the table t2 and the table t1

Aie! Error message:
- Failed to create a foreign key
- Column ‘c1’ must be a primary key
It’s very good to have this control and information.
This will help a lot of developers…
I will not continue more with the design.
It’s already and really a good tool to design our schema.
One good point is the export button to have the schema design as a picture with 3 formats possibilities svg ,png or jpeg.
No excuse to not do a documentation! 😉

The definition button gives you the design script:

The last button to use is the Publish Changes:

I wait a little bit, and I have the resume of the design change:

I like the checkbox “I have read the summary and understand the potential risks” and I publish.
It’s just a discovery about the Schema design preview.
It will be a good help for developers.
See you soon for the next episode! 😉