From the course: SQL Essential Training

Queries

- You're probably starting to notice that SQL is a simple yet powerful language with many different commands. Getting familiar with some of these SQL commands is one of the key components to getting the hang of working with databases. One of the best ways to get familiar with these commands is to simply type it out. Typing out the commands as you encounter them helps to retain and understand their use. You'll get more insight about how they allow you to access and control your data. Whether you're searching for specific pieces of information, creating new tables, or adding new records, there are definitely more SQL commands than I can ever show you in this course or you should bother to retain. Beside a few that are simple and easy to use, it's really more important to understand the principle behind finding and using the appropriate SQL command. In this chapter, I'll cover basic query writing etiquette. So you may need a knife, a fork, and a plate. I'm just kidding. But we will understand the basics of writing a proper query and formatting the results. Some of the topics we'll discuss are: creating comments, SQL query best practices, using an alias, along with sorting and limiting your query results. By the end of this chapter, you'll be able to select individual columns, also known as fields in SQL world, from a specific database and display those fields in alphabetical order. Okay, enough talk. Let's get started.

Contents