Checking LocalDB version:
sqlcmd -S "(LocalDB)\MSSQLLocalDB" -Q "SELECT @@VERSION"
Removing existing LocalDB instance:
sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB
Creating a new SQL Server 2016 LocalDB instance:
sqllocaldb create "MSSQLLocalDB" 13.0
sqllocaldb start "MSSQLLocalDB"
Listing LocalDB instances:
sqllocaldb info
These commands collectively helped to:
- Identify the existing LocalDB version
- Remove the SQL Server 2019 LocalDB instance
- Create and start a new SQL Server 2016 LocalDB instance
- Verify the new instance
- Correctly modify database tables