Deprecated: Creation of dynamic property Automattic\Jetpack_Boost\Features\Speed_Score\Speed_Score::$modules is deprecated in /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php on line 20

Deprecated: Creation of dynamic property DIK_WXR_Importer::$options is deprecated in /home1/socaliyc/public_html/wp-content/plugins/demo-import-kit/inc/class-wxr-importer.php on line 96

Warning: session_start(): Session cannot be started after headers have already been sent in /home1/socaliyc/public_html/wp-content/plugins/unyson/framework/includes/hooks.php on line 259

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 560

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 561

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 562

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 604

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 605

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 606

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 607

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 608

Warning: Cannot modify header information - headers already sent by (output started at /home1/socaliyc/public_html/wp-content/plugins/jetpack-boost/app/features/speed-score/Speed_Score.php:20) in /home1/socaliyc/public_html/wp-includes/feed-rss2.php on line 8
Akash, Author at So Called Happenings One Stop for Everything! Fri, 24 Sep 2021 11:10:59 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://i0.wp.com/socalledhappenings.in/wp-content/uploads/2021/08/cropped-Banner-Logo.png?fit=32%2C32&ssl=1 Akash, Author at So Called Happenings 32 32 196820137 What is SQL ? https://socalledhappenings.in/what-is-sql-data-base/ https://socalledhappenings.in/what-is-sql-data-base/#comments Fri, 24 Sep 2021 11:10:56 +0000 https://socalledhappenings.in/?p=2212 SQL is a standard language for storing, manipulating and retrieving data in databases. What is SQL? SQL is a standard Database language which is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, SQL Server, PostGre, etc SQL stands for Structured Query Language It lets […]

The post What is SQL ? appeared first on So Called Happenings.

]]>
SQL is a standard language for storing, manipulating and retrieving data in databases.

What is SQL?

SQL is a standard Database language which is used to create, maintain and retrieve the data from relational databases like MySQL, Oracle, SQL Server, PostGre, etc

  • SQL stands for Structured Query Language
  • It lets you access and manipulate data from databases

RDBMS

RDBMS stands for Relational Database Management System.

It is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

The data in RDBMS is stored in database objects called tables. A table is a collection of related entries and it consists of columns and rows.

Database Tables

A database most often contains one or more tables. Each table is identified by a name.

SQL Statements

Most of the actions you need to perform on a database are done with SQL statements.

Semicolon after SQL Statements?

Some database systems require a semicolon at the end of each SQL statement.

Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.

Keep in Mind That…

  • SQL keywords are NOT case sensitive: select is the same as SELECT

Some of The Most Important SQL Commands

  • SELECT – extracts data from a database
  • UPDATE – updates data in a database
  • DELETE – deletes_data from a database
  • INSERT INTO – inserts new_data into a database
  • CREATE DATABASE – creates a new database
  • ALTER DATABASE – modifies a database
  • CREATE TABLE – creates a new table
  • ALTER TABLE – modifies a table
  • DROP TABLE – deletes a table
  • CREATE INDEX – creates an index (search key)
  • DROP INDEX – deletes an index

The SQL SELECT Statement

The SELECT statement is used to select data from a database.

The data returned is stored in a result table called the result-set.

SELECT Syntax

SELECT column1, column2, …
FROM table_name;

Here, column1, column2, … are the field names of the table you want to select data from. To select all the fields available in the table, use the following syntax:

SELECT * FROM table_name;

The SQL SELECT DISTINCT Statement

The SELECT DISTINCT statement is used to return only distinct (different) values.

Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.

SELECT DISTINCT Syntax

SELECT DISTINCT column1, column2, …
FROM table_name;

The following SQL statement lists the number of different (distinct) customer countries:

Example

SELECT COUNT(DISTINCT Country) FROM Customers;

Note: The example above will not work in Firefox! Because COUNT(DISTINCT column_name) is not supported in Microsoft Access databases. Firefox is using Microsoft Access in our examples.

Here is the workaround for MS Access:

Example

SELECT Count(*) AS DistinctCountries
FROM (SELECT DISTINCT Country FROM Customers);

The SQL WHERE Clause

The WHERE clause is used to filter records.

It is used to extract only those records that fulfill a specified condition.

WHERE Syntax

SELECT column1, column2, …
FROM table_name
WHERE condition;

Note: The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!

Operators in The WHERE Clause

The following operators can be used in the WHERE clause:

OperatorDescription
=Equal
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal
<>Not equal. Note: In some versions of SQL this operator may be written as !=
BETWEENBetween a certain range
LIKESearch for a pattern
INTo specify multiple possible values for a column

The post What is SQL ? appeared first on So Called Happenings.

]]>
https://socalledhappenings.in/what-is-sql-data-base/feed/ 539 2212