5

How To Use SQL

 2 years ago
source link: https://www.digitalocean.com/community/tutorial_series/how-to-use-sql
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
search community/
Sign Up

tutorial series

How To Use SQL

by Mark Drake

Series Description

Structured Query Language — commonly known as SQL — is a language used to define, control, manipulate, and query data held in a relational database. SQL has been widely adopted since it was first developed in the 1970s, and today it’s the predominant language used to manage relational database management systems.

Ideal for managing structured data (data that can fit neatly into an existing data model), SQL is an essential tool for developers and system administrators in a wide variety of contexts. Also, because of its maturity and prevalence, candidates with SQL experience are highly sought after for jobs across a number of industries.

This series is intended to help you get started with using SQL. It includes a mix of conceptual articles and tutorials which provide introductions to various SQL concepts and practices. You can also use the entries in this series for reference while you continue to hone your skills with SQL.

Note: Please be aware that the tutorials in this series use MySQL in examples, but many RDBMSs use their own unique implementations of SQL. Although the commands outlined in this tutorial will work on most RDBMSs, the exact syntax or output may differ if you test them on a system other than MySQL.

Updated on July 16, 2020

This conceptual article outlines the history of the relational model, how relational databases organize data, and how they’re used today.

Updated on September 14, 2020

Relational database management systems allow you to control what data gets added to a table with constraints. A constraint is a special rule that applies to one or more columns — or to an entire table — that restricts what changes can be made to a table’s data. This article will go over in detail what constraints are and how they’re used in relational databases. It will also walk through each of the five constraints defined in the SQL standard and explain their respective functions.

Updated on September 14, 2020

Tables are the primary organizational structure in SQL databases. They consist of any number of columns, which reflect individual attributes of each row, or record, in the table. Being such a fundamental aspect of data organization, creating and managing tables are common tasks for anyone who builds or maintains databases. This guide outlines how to create tables in SQL, as well as how to modify and delete existing tables.

Updated on September 14, 2020

When designing an SQL database, there may be cases where you want to impose restrictions on what data can be added to certain columns in a table. SQL makes this possible through the use of constraints. After applying a constraint to a column or table, any attempts to add…

Updated on September 14, 2020

SQL provides a great deal of flexibility in terms of how it allows you to insert data into tables. You can specify individual rows of data with the VALUES keyword, copy entire sets of data from existing tables with SELECT queries, as well as define columns in ways that will cause SQL to insert data into them automatically. In this guide, we’ll go over how to employ each of these methods to load tables with data using SQL’s INSERT INTO syntax.

Updated on October 20, 2020

When working with a database, there may be times when you need to change data that’s already been inserted into it; you may need to correct a misspelled entry, or perhaps you have information to add to an incomplete record. SQL provides the UPDATE statement which allows users to change existing data in a table. This guide outlines how you can use SQL’s UPDATE syntax to change data in one or more tables. It will also explain how SQL handles UPDATE operations that conflict with foreign keys.

Updated on September 14, 2020

As the name implies, DELETE operations irreversibly delete one or more rows of data from a database table. Being such a fundamental aspect of data management, it’s important for SQL users to understand how the DELETE statement behaves and how it deletes data. This guide will go over how to use SQL’s DELETE syntax to delete data from one or more tables. It will also explain how foreign key constraints handle DELETE operations.

Updated on December 18, 2020

One of the most fundamental parts of working with databases is the practice of retrieving information about the data held within them. In relational database management systems, any operation used to retrieve information from a table is referred to as a query. In this guide, we will discuss the basic syntax of queries in Structured Query Language (SQL) as well as some of their more commonly used functions and operators.

Updated on December 18, 2020

In Structured Query Language (SQL) statements, WHERE clauses limit what rows the given operation will affect. This guide will go over the general syntax used in WHERE clauses. It will also outline how to combine multiple search condition predicates in a single WHERE clause to filter data with more granularity, as well as how to use the NOT operator to exclude, rather than include, rows that meet a given search condition.

Updated on December 18, 2020

In certain Structured Query Language (SQL) statements, WHERE clauses can be used to limit what rows the given operation will affect. SQL allows users to retrieve granular result sets by providing a variety of different types of predicates, each of which use a specific operator to evaluate rows. This guide will outline two types of predicates: range predicates which use the BETWEEN operator, and set membership predicates which use the IN operator.

Updated on December 18, 2020

In certain Structured Query Language (SQL) statements, WHERE clauses can be used to limit what rows the given operation will affect. SQL allows users to retrieve granular result sets by providing a variety of different types of predicates, each of which use a specific operator to evaluate rows. This guide will outline two types of predicates and the operators they use: comparison operators and the IS NULL operator.

Updated on September 14, 2020

Like many computer languages, SQL allows the use of various wildcard characters. Wildcards are special placeholder characters that can represent one or more other characters or values. This is a convenient feature in SQL, as it allows you to search your database for your data without knowing the exact values held within it. This tutorial will go over how to query data using SQL’s designated wildcards.

Updated on October 20, 2020

Many database designs separate information into different tables based on how certain data points relate to one another. Even in cases like this, it’s likely that there will be times when someone will want to retrieve information from more than one table at a time. A common way of accessing data from multiple tables in a single SQL operation is to combine the tables with a JOIN clause. This guide outlines how to retrieve data from multiple tables by joining them together.

Published on January 28, 2022

In this tutorial, you’ll practice using mathematical expressions. First, you’ll use numeric operations on a calculator, then use those operators on sample data to perform queries with aggregate functions, and finish with a business scenario to query sample data for more complex information and analysis.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK