(SQL Tutorials for Citizen Data Scientist) SQL CREATE INDEX Statement In this tutorial you will learn how to create indexes on tables to improve the database performance. What is Index? An index is a data structure associated with a table that provides fast access to rows in a table based on the values in one or more …
Day: December 17, 2020
(SQL Tutorials for Citizen Data Scientist) SQL CREATE VIEW Statement In this tutorial you will learn how to create, update, and delete a view using SQL. Creating Views to Simplify Table Access A view is a virtual table whose definition is stored in the database. But, unlike tables, views do not actually contain any data. Instead, it …
(SQL Tutorials for Citizen Data Scientist) SQL HAVING Clause In this tutorial you will learn how to filter the groups returned by a GROUP BY clause. Filtering the Groups Based on Condition The HAVING clause is typically used with the GROUP BY clause to specify a filter condition for a group or an aggregate. The HAVING clause can only be used with the SELECT statement. To understand …
(SQL Tutorials for Citizen Data Scientist) SQL GROUP BY Clause In this tutorial you will learn how to group rows based on column values. Grouping Rows The GROUP BY clause is used in conjunction with the SELECT statement and aggregate functions to group rows together by common column values To understand this easily, let’s look at the following employees and departments tables. +——–+————–+————+———+ | emp_id | emp_name …
(SQL Tutorials for Citizen Data Scientist) SQL Aliases In this tutorial you will learn how to specify a short alias name for a table or a table column within an SQL statement. Defining Table Aliases When multiple tables are being joined in a single query, you need to prefix each column name with the name of …
(SQL Tutorials for Citizen Data Scientist) SQL ALTER TABLE Statement In this tutorial you will learn how to alter or modify an existing table using SQL. Modifying Existing Tables It is quite possible that after creating a table, as you start using it, you may discover you’ve forgot to mention any column or constraint or specified a …