In order to insert data from .sql file to Xampp database in Windows 10 you have to:
1. Open command line and cd to mysql directory in xampp directory
2. Then run command below:
mysql -u root -p nameofdatabase < C:\xampp\htdocs\nameoffile.sql
Put your password after -p if you have a password and if your username is different to root put your username after -u.