• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Sql » SQL

Sql Functions

Sql Commands

Sql Queries

Sql Tutorials

SQL

SQL INSERT INTO Statement

By Dinesh Thakur

The INSERT statement is used to add new row to a table. To insert new row(s) into a table, the table must be in your own schema or you must have INSERT privilege on the table. Only one row is inserted at a time with this syntax. You can insert literal values (26.5, ‘DINESH), expres­sions containing operators and functions, null values etc. only. [Read more…] about SQL INSERT INTO Statement

SQL: COUNT Function

By Dinesh Thakur

SQL COUNT is the aggregate arithmetic function. COUNT allows us to COUNT number of row that matches specified criteria. This function returns the number of rows in the query. The COUNT function will only count those records in which the field in the brackets is NOT NULL. The SQL COUNT function is easy to use. [Read more…] about SQL: COUNT Function

SQL CAST() Function

By Dinesh Thakur

All of the aforementioned functions relate to specific ways to manipulate character, date/time, or numeric datatypes. But you may need to convert data from one datatype to another or convert NULL values to something meaningful. [Read more…] about SQL CAST() Function

SQL Server ROUND() Function

By Dinesh Thakur

 The ROUND function allows you to round any numeric value. The general format is: [Read more…] about SQL Server ROUND() Function

SQL GETDATE() Function

By Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example: [Read more…] about SQL GETDATE() Function

SQL DATEPART() Function

By Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example: [Read more…] about SQL DATEPART() Function

SQL Server DATEDIFF() Function

By Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example: [Read more…] about SQL Server DATEDIFF() Function

SQL: DECODE Function

By Dinesh Thakur

The DECODE function can be thought of as an inline IF statement. DECODE takes three or more expressions as arguments. Each expression can be a column, a literal, a function, or even a subquery. Let’s look at a simple example using DECODE: [Read more…] about SQL: DECODE Function

SQL NVL Function

By Dinesh Thakur

The NVL and NVL2 functions allow you to test an expression to see whether it is NULL. If an expression is NULL, you can return an alternate, non-NULL value, to use in its place. Since any of the expressions in a DECODE statement can be NULL, the NVL and NVL2 functions are actually specialized versions of DECODE. The following example uses NVL2 to produce the same results as the DECODE: [Read more…] about SQL NVL Function

SQL Using Joins

By Dinesh Thakur

Thus far we have only been getting data from one table at a time. This is fine for simple tasks, but in most real world SQL usage you will often need to get data from multiple tables in a single query. Oracle provides the facility to retrieve the data from multiple tables with the help of joins. It is perhaps a wonderful feature of SQL that permit to retrieve the data from multiple users. [Read more…] about SQL Using Joins

SQL INNER JOIN

By Dinesh Thakur

In SQL inner joins are also called simple joins or equijoin. We are now ready to present a SELECT statement with what is called an inner join: [Read more…] about SQL INNER JOIN

SQL Self JOIN

By Dinesh Thakur

A self-join is a query in which a table is joined (compared) to itself. Self-joins are used to compare values in a column with other values in the same column in the same table. The SQL self-join can be done by using table aliases to cheat one table like a different table and then join them together. [Read more…] about SQL Self JOIN

SQL RIGHT JOIN Keyword

By Dinesh Thakur

A right outer join (or right join) closely resembles a left outer join, except with the treatment of the tables reversed. Every row from the “right” table (B) will appear in the Joined table at least once. If no matching row from the “left” table (A) exists, NULL will appear in columns from A for those records that have no match in A. [Read more…] about SQL RIGHT JOIN Keyword

SQL: Types of Joins

By Dinesh Thakur

It is important to note that the INNER JOIN only returns data where a match is found. While using the inner join we have seen that if there exists certain records in one table. Which doesn’t have corresponding values in the second table then those rows will not be selected. [Read more…] about SQL: Types of Joins

SQL LEFT OUTER JOIN

By Dinesh Thakur

The result of a left outer join (or simply left join) for table A and B always contains records of the “left” table (A), even if the join-condition does not find any matching record in the “right” table (B). This means that if the ON clause matches 0 (zero) records in B, the join will still return a row in the result-but with NULL in each column from B. [Read more…] about SQL LEFT OUTER JOIN

SQL FULL OUTER JOIN Keyword

By Dinesh Thakur

To retrieve the Employee name, job, salary, deptno, dname from EMP, DEPT table. It will return all information regarding the employees and the department information. This is Full Outer Join’s Example. [Read more…] about SQL FULL OUTER JOIN Keyword

SQL CROSS JOIN

By Dinesh Thakur

A cross join, or product provides the foundation upon which all types of inner joins operate. A cross join returns the Cartesian product of the sets of records from the two joined tables. Thus, it equates to an inner join where the join-condition always evaluates to true or join-condition is absent in statement. This command is introduced for Oracle9i. If A and B are two sets, then the cross join is written as A x B. [Read more…] about SQL CROSS JOIN

SQL CREATE INDEX Statement and Types of Indexes

By Dinesh Thakur

When the user fires a SELECT statement to search for a particular record, the oracle engine must first locate the table on the hard disk. The Oracle engine reads the information and locates the starting location of a table’s record on the current storage media. [Read more…] about SQL CREATE INDEX Statement and Types of Indexes

SQL DROP INDEX

By Dinesh Thakur

The SQL DROP INDEX statement is the SQL command that removes an entire SQL index. You may drop an index permanently when it is no longer useful or temporarily. If the index is harming or not helping performance it could be dropped. [Read more…] about SQL DROP INDEX

SQL DROP TABLE Statement

By Dinesh Thakur

Sometimes we may decide that we need to get rid of a table in the database for some reason. The SQL DROP TABLE statement is the SQL command that removes an entire SQL table. This command also removes one or more table definitions and all data, indexes, triggers, constraints, and permission specifications for those tables. [Read more…] about SQL DROP TABLE Statement

SQL Alias Syntax

By Dinesh Thakur

You can rename a table or a column temporarily by giving another name known as alias. The term alias means an alternate name. Here’s an example of how to use a column alias [Read more…] about SQL Alias Syntax

SQL ALTER TABLE Statement

By Dinesh Thakur

After the table( s) are created and begin to be used, requirements are likely to occur which requires modifications in the structure of the table, such as adding new columns to the table, modifying and existing column’s definition etc. So these modifications can be performed using the ALTER table DDL statement. Tills statement changes the structure of the table and not its contents. There are many types of modifications that can be made to the structure of the tables. Using ALTER TABLE statement, you can make modifications such as [Read more…] about SQL ALTER TABLE Statement

SQL BETWEEN Operator

By Dinesh Thakur

The SQL BETWEEN & AND operator selects a range of data between two values. You can also use the BETWEEN function with dates. The BETWEEN function can also be combined with the NOT operator. [Read more…] about SQL BETWEEN Operator

SQL CHECK Constraint

By Dinesh Thakur

Check constraint is used to validate values entered into a column. CHECK constraints enforce domain integrity by limiting the values that are accepted by a column. They are similar to FOREIGN KEY constraints in that they control the values that are placed in a column. The difference is in how they determine which values are valid: FOREIGN KEY constraints get the list of valid values from another table. [Read more…] about SQL CHECK Constraint

SQL Constraints and Types of Constraints

By Dinesh Thakur

Constraints are used to limit the type of data that can go into a table. Integrity constraints are used to ensure accuracy and consistency of data in a relational database. Constraints can be specified when a table is created (with the CREATE TABLE statement) or after the table is created (with the ALTER TABLE statement). [Read more…] about SQL Constraints and Types of Constraints

Next Page »

Primary Sidebar

SQL Tutorials

SQL Tutorials

  • SQL - Home
  • SQL - Select
  • SQL - Create
  • SQL - View
  • SQL - Sub Queries
  • SQL - Update
  • SQL - Delete
  • SQL - Order By
  • SQL - Select Distinct
  • SQL - Group By
  • SQL - Where Clause
  • SQL - Select Into
  • SQL - Insert Into
  • SQL - Sequence
  • SQL - Constraints
  • SQL - Alter
  • SQL - Date
  • SQL - Foreign Key
  • SQL - Like Operator
  • SQL - CHECK Constraint
  • SQL - Exists Operator
  • SQL - Drop Table
  • SQL - Alias Syntax
  • SQL - Primary Key
  • SQL - Not Null
  • SQL - Union Operator
  • SQL - Unique Constraint
  • SQL - Between Operator
  • SQL - Having Clause
  • SQL - Isnull() Function
  • SQL - IN Operator
  • SQL - Default Constraint
  • SQL - Minus Operator
  • SQL - Intersect Operator
  • SQL - Triggers
  • SQL - Cursors

Advanced SQL

  • SQL - Joins
  • SQL - Index
  • SQL - Self Join
  • SQL - Outer Join
  • SQL - Join Types
  • SQL - Cross Join
  • SQL - Left Outer Join
  • SQL - Right Join
  • SQL - Drop Index
  • SQL - Inner Join
  • SQL - Datediff() Function
  • SQL - NVL Function
  • SQL - Decode Function
  • SQL - Datepart() Function
  • SQL - Count Function
  • SQL - Getdate() Function
  • SQL - Cast() Function
  • SQL - Round() Function

Other Links

  • SQL - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW