Types of Databases

 

SQL Databases: 


There are many different types of SQL databases designed for different purposes.

Some of the most popular databases include:

  1. MySQL
  2. Access
  3. Oracle
  4. Microsoft SQL Server
  5. Postgres

You can also write SQL within other programming frameworks like Python, Scala, and HaDoop.


Types of Statements:


The key to SQL is understanding statements. A few statements include:


  1. CREATE TABLE is a statement that creates a new table in a database.
  2. DROP TABLE is a statement that removes a table in a database.
  3. SELECT allows you to read data and display it. This is called a query.

The SELECT statement is the common statement used by analysts


SELECT & FROM


Here we introduced to the SQL command that will be used in every query we write: SELECT ... FROM ....


  1. SELECT indicates which column(s) you want to be given the data for.

  2. FROM specifies from which table(s) you want to select the columns. Notice the columns need to exist in this table.

If you want to be provided with the data from all columns in the table, you use "*", like so:


  • SELECT * FROM orders

Note that using SELECT does not create a new table with these columns in the database, it just provides the data to you as the results, or output, of this command.


SELECT and FROM in Every SQL Query:


Every query will have at least a SELECT and FROM statement. The SELECT statement is where you put the columns for which you would like to show the data. The FROM statement is where you put the tables from which you would like to pull data.


Your First Queries:


SELECT id, account_id, occurred_at FROM orders;






Comments

Popular posts from this blog

Entity Relationship Diagrams

Arithmetic Operators

NOT