Yes you can export sdf to sql script and then run the sql script on new sql database.
Below link shows the step-by-step guide to achieve it. https://blog.nicolaayan.com/2018/02/how-to-migrate-sdf-database-to-sql-server/
cmd=> ExportSqlCE40.exe "data source=INSERTDBNAMEHERE.sdf" database.sql