SQL for Beginners

Learn to Code SQL Example – SQL | Numeric Functions

Hits: 11 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | Numeric Functions Numeric Functions are used to perform operations on numbers and return numbers. Following are the numeric functions defined in SQL: ABS(): It returns the absolute value of a number. Syntax: SELECT ABS(-243.5); Output: 243.5 SQL> SELECT ABS(-10); +————————————–+ | ABS(10) +————————————–+ | …

Learn to Code SQL Example – SQL | DROP, TRUNCATE

Hits: 0 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | DROP, TRUNCATE DROP DROP is used to delete a whole database or just a table.The DROP statement destroys the objects like an existing database, table, index, or view. A DROP statement in SQL removes a component from a relational database management system …

Learn to Code SQL Example – SQL | SELECT Query

Hits: 7 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | SELECT Query Select is the most commonly used statement in SQL. The SELECT Statement in SQL is used to retrieve or fetch data from a database. We can fetch either the entire table or according to some specified rules. The data …

Learn to Code SQL Example – SQL | UNIQUE Constraint

Hits: 5 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | UNIQUE Constraint Unique constraint in SQL is used to check whether the sub query has duplicate tuples in it’s result. It returns a boolean value indicating the presence/absence of duplicate tuples. Unique construct returns true only if the sub query has …

Learn to Code SQL Example – SQL | AND and OR operators

Hits: 4 (SQL Example for Citizen Data Scientist & Business Analyst)   SQL | AND and OR operators In SQL, the AND & OR operators are used for filtering the data and getting precise result based on conditions. The AND and OR operators are used with the WHERE clause. These two operators are called conjunctive operators. …

SQL tutorials for Business Analyst – SQL | Date Functions

Hits: 48  SQL tutorials for Business Analyst – SQL | Date Functions   The following table has a list of all the important Date and Time related functions available through SQL. There are various other functions supported by your RDBMS. The given list is based on MySQL RDBMS. Sr.No. Function & Description 1 ADDDATE()Adds dates …

SQL tutorials for Business Analyst – SQL | Wildcard Operators

Hits: 35  SQL tutorialsfor Business Analyst SQL| Wildcard Operators We have already discussed about the SQL LIKE operator, which is used to compare a value to similar values using the wildcard operators. SQL supports two wildcard operators in conjunction with the LIKE operator which are explained in detail in the following table. Sr.No. Wildcard & …

SQL tutorials for Business Analyst – SQL | Transactions

Hits: 85 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | Transactions.   SQL tutorials for Business Analyst – SQL | Transactions   A transaction is a unit of work that is performed against a database. Transactions are units or sequences of …

SQL tutorials for Business Analyst – SQL | Having Clause

Hits: 64 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | Having Clause.   SQL tutorials for Business Analyst – SQL | Having Clause   The HAVING Clause enables you to specify conditions that filter which group results appear in the results. The WHERE …

SQL tutorials for Business Analyst – SQL | Using Views

Hits: 42 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | Using Views.   A view is nothing more than a SQL statement that is stored in the database with an associated name. A view is actually a composition of a table …

SQL tutorials for Business Analyst – SQL | TRUNCATE TABLE

Hits: 37 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | TRUNCATE TABLE.   The SQL TRUNCATE TABLE command is used to delete complete data from an existing table. You can also use DROP TABLE command to delete complete table but it would remove …

SQL tutorials for Business Analyst – SQL | ALTER TABLE

Hits: 18 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | ALTER TABLE.   The SQL ALTER TABLE command is used to add, delete or modify columns in an existing table. You should also use the ALTER TABLE command to add and drop various …

SQL tutorials for Business Analyst – SQL | Indexes

Hits: 29 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | Indexes.   Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index …

SQL tutorials for Business Analyst – SQL | Alias Syntax

Hits: 24 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | Alias Syntax.   You can rename a table or a column temporarily by giving another name known as Alias. The use of table aliases is to rename a table in a specific …

SQL tutorials for Business Analyst – SQL | EXCEPT Clause

Hits: 17 (SQL tutorials for Business Analyst & Beginners) In this end-to-end example, you will learn – SQL Tutorials for Business Analyst: SQL | EXCEPT Clause.   The SQL EXCEPT clause/operator is used to combine two SELECT statements and returns rows from the first SELECT statement that are not returned by the second SELECT statement. This means EXCEPT …