If you are a software developer, database administrator, data analyst, or data scientist who wants to use SQL to analyze data, this tutorial is a great start. Each topic is covered clearly and concisely with many practical examples so that you can both truly understand the concept and know how to apply it to solve the data problems more effectively. Today, SQL is one of the most common programming languages for interacting with data. Comparison operators — learn how to use the comparison operators including greater than, greater than or equal, less than, less than or equal, equal, and not equal to form the condition in the WHERE clause. Logical operators — introduce the logical operators and how to use them to test for the truth of a condition. Section
|Published (Last):||21 January 2007|
|PDF File Size:||13.43 Mb|
|ePub File Size:||14.3 Mb|
|Price:||Free* [*Free Regsitration Required]|
Order By — guides you on how to sort the result set returned from a query. Section 3. Fetch — limits the number of rows returned by a query. Is Null — checks if a value is null or not. Section 4. Self-join — joins a table to itself by comparing a table to itself. Cross Join — produces a Cartesian product of the rows in two or more tables. Natural Join — joins two or more tables using implicit join condition based on the common column names in the joined tables.
Section 5. Section 6. Intersect — combines the result sets of two or more queries and returns a single result set that has the rows appear in both result sets. Except — returns the rows in the first query that does not appear in the output of the second query. Section 7. Cube — define multiple grouping sets that include all possible combinations of dimensions. Rollup — generate reports that contain totals and subtotals.
Section 8. Subquery Subquery — writes a query nested inside another query. ALL — query data by comparing a value with a list of values returned by a subquery. Section 9. Recursive query using CTEs — discusses the recursive query and learns how to apply it in various contexts. Section Besides, you learn how to use the upsert statement to merge data. Insert — inserts data into a table. Update — updates existing data in a table.
Update join — updates values in a table based on values in another table. Delete — deletes data in a table. Managing Databases In this section, you will learn how to manage databases in PostgreSQL including creating databases, modifying existing database features and deleting databases.
Rename Database — changes the name of the database to a new one. Copy a Database — copies a database within a database server or from a server to another. Get Database Object Sizes — introduces you to various handy functions to get the size of a database, a table, and indexes.
We will also cover some additional features, such as modifying table structure and deleting tables. Create table — guides you on how to create a new table in the database. Sequences — introduce you to sequences and describe how to use a sequence to generate a sequence of numbers. Identity column — shows you how to use the identity column.
Alter table — changes the structure of an existing table. Rename table — change the name of the table to a new one. Drop column — demonstrates how to drop a column of a table. Change column data type — shows you how to change the data of a column. Rename column — illustrates how to rename one or more column of a table. Truncate table — removes all data in a large table quickly and efficiently.
Temporary table — shows you how to use the temporary table. Copy a table — shows you how to copy a table to a new one. Foreign key — shows you how to define foreign key constraints when creating a new table or add foreign key constraints for existing tables.
UNIQUE constraint — makes sure that values in a column or a group of columns unique across the table. Interval — shows you how to use interval data type to handle a period of time effectively. Create Schema — shows you how to create a new schema in a database. Alter Schema — renames a schema or changes its owner to the new one. Drop schema — deletes one or more schemas with their objects from a database. PostgreSQL Utilities psql commands — shows you the most common psql commands that help you interact with psql faster and more effectively.
PostgreSQL Recipes How to compare two tables — describes how to compare data in two tables in a database. PostgreSQL vs.
Discussion SQL is a database computer language designed for the retrieval and management of data in a relational database. This tutorial will give you a quick start to SQL. It covers most of the topics required for a basic understanding of SQL and to get a feel of how it works. Why to Learn SQL? SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.