28 May 2021 Andrew Bone UNION vs. UNION ALL in SQL: What’s the Difference? UNION and UNION ALL are both used to retrieve records from multiple tables. This article will detail the differences between the two, allowing you to make the best choice for each unique scenario. You can use SQL’s UNION and UNION ALL commands to get data from multiple tables in your database. It’s a common use case, considering that most databases have many tables. Both UNION and UNION ALL are known as set operators. Read more 18 May 2021 Andrew Bone How to Use Aliases in SQL Queries An SQL alias is useful for simplifying your queries and making the query and its result more readable. This article explains why and how you can use aliases in your SQL queries. You can temporarily rename a table or a column by giving it another name. This is known as an SQL alias. It’s a temporary change that does not affect the actual table name in the database. A temporary table name can also be called a correlation name. Read more 23 Apr 2021 Andrew Bone What Is the Role of DISTINCT in SQL? The DISTINCT keyword in SQL plays an important role in removing duplicate values from your results. This article provides examples showing exactly how DISTINCT works. By default, SQL queries show all the returned rows, including duplicate rows, in the result set. The DISTINCT keyword in the SELECT clause is used to eliminate duplicate rows and display a unique list of values. In other words, the DISTINCT keyword retrieves unique values from a table. Read more 21 Apr 2021 Andrew Bone What Do the SQL INTERSECT and MINUS Clauses Do? Do you know the difference between SQL’s INTERSECT and MINUS clauses and how to use them? You will find examples and explanations in this article. SQL INTERSECT and MINUS are useful clauses for quickly finding the difference between two tables and finding the rows they share. INTERSECT compares the data between tables and returns only the rows of data that exist in both tables. MINUS compares the data between tables and returns the rows of data that exist only in the first table you specify. Read more 31 Mar 2021 Andrew Bone What Is CASE in SQL? SQL CASE is a very useful expression that provides if-else logic to your SQL queries. It’s a slightly more advanced topic, but you’ll need it when preparing reports – it will deliver massive value to your personal and professional projects. The SQL CASE statement is a control flow tool that allows you to add if-else logic to a query. Generally speaking, you can use the CASE statement anywhere that allows a valid expression – e. Read more 4 Mar 2021 Andrew Bone What Do the Operators LIKE and NOT LIKE Do? The SQL LIKE and NOT LIKE operators are used to find matches between a string and a given pattern. They are part of standard SQL and work across all database types, making it essential knowledge for all SQL users. Gaining an understanding of these operators will allow you to write better queries and demonstrate to potential employers that you have the skills required to filter through expansive data sets. Read more 28 Jan 2021 Andrew Bone Using AND, OR, and NOT Operators in SQL AND, OR, and NOT are important logical operators in SQL. They help you combine the conditions used to filter records. They are most commonly used in conjunction with the WHERE or HAVING clauses. Furthermore, this topic is a pretty common SQL job interview question. To help you completely understand these operators, I’ll take you through some examples, fully explaining the syntax and purpose of each. Practicing using examples like these is one of the best methods for learning SQL. Read more 19 Jan 2021 Andrew Bone What Is the SQL WHERE Clause? The WHERE clause is a fundamental part of SQL. This clause filters results and applies conditions to SQL queries. It is most commonly used alongside the SELECT statement. If you’re a complete newcomer to this topic, you can learn the basics of SQL, including WHERE, in our SQL Basics course This article will clearly explain how to use WHERE in a SQL query. After reading it, you’ll have the confidence and knowledge to integrate WHERE into your daily work. Read more 9 Dec 2020 Andrew Bone The Top 10 SQL JOIN Interview Questions with Answers Have you ever wondered what SQL JOIN questions you might be asked in an interview? Do you feel prepared to answer them? This article covers the most common SQL JOIN interview questions and how to answer them. If you are applying for a job as a data analyst or software developer, you will likely be asked about your SQL JOIN knowledge. SQL JOIN clauses are a great topic for interviewers to quiz you on. Read more «« « 1 2 » »»