Yes, you can learn the SQL server at home. If you are a novice and not from a CS background, it takes two to three weeks to learn SQL basics. I recommend starting with online courses because instructors will explain the basic principles which help you learn SQL faster. There are many SQL tutorials to understand the SQL Basics. After that, you can easily learn the advanced SQL topics.
If you want to learn SQL, check out this SQL Training by Intellipaat.