• 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 Queries

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

SQL DATE Function

By Dinesh Thakur

The most difficult part when working with dates is to be sure that the format of the date you are trying to insert, matches the format of the date column in the database. As long as your data contains only the date portion, your queries will work as expected. However, if a time portion is involved, it gets complicated. [Read more…] about SQL DATE Function

SQL DEFAULT Constraint

By Dinesh Thakur

The DEFAULT constraint is used to insert a default value into a column. The default value will be added to all new records, if no other value is specified. You can also specify the DEFAULT value for columns i.e. when user does not enter anything in that column then that column will have the default value. Default constraints are ANSI -standard constraints you can assign to a column either with the CREATE TABLE or ALTER TABLE statements. [Read more…] about SQL DEFAULT Constraint

SQL EXISTS Operator

By Dinesh Thakur

The EXISTS condition is considered “to be met” if the subquery returns at least one row. EXISTS operator simply tests whether the inner query returns any row. If it does, then the outer query proceeds. If not, the outer query does not execute, and the entire SQL statement returns nothing. [Read more…] about SQL EXISTS Operator

SQL FOREIGN KEY Constraint

By Dinesh Thakur

A FOREIGN KEY in one table points to a PRIMARY KEY in another table. On whichever column you put FOREIGN KEY constraint then the values in that column must refer to existing values in the other table. [Read more…] about SQL FOREIGN KEY Constraint

SQL HAVING Clause

By Dinesh Thakur

The HAVING Clause was added to SQL because the WHERE keyword could not be used with aggregate functions. As we know that WHERE clause is used to restrict the number of rows fetched from the table. But if we try to restrict the number of groups with where clause it will generate an error message. So we can use having clause to divide the groups with Group by clause. [Read more…] about SQL HAVING Clause

SQL IN Operator

By Dinesh Thakur

The IN operator allows you to specify multiple values in a WHERE clause. The IN function helps reduce the need to use multiple OR conditions. The SQL IN clause allows you to specify discrete values in your SQL WHERE search criteria. The syntax for using the IN keyword is as follows: [Read more…] about SQL IN Operator

SQL INTERSECT Operator

By Dinesh Thakur

Similar to the UNION command, INTERSECT also operates on two SQL statements. The difference is that, while UNION essentially acts as an OR operator (value is selected if it appears in either the first or the second statement), the INTERSECT command acts as an AND operator (value is selected only if it appears in both statements). [Read more…] about SQL INTERSECT Operator

SQL ISNULL() Function

By Dinesh Thakur

Null is a special marker used in Structured Query Language (SQL) to indicate that a data value does not exist in the database. NULL means missing information and inapplicable information”. NULL values represent missing unknown data. By default, a table column can hold NULL values. [Read more…] about SQL ISNULL() Function

SQL LIKE Operator

By Dinesh Thakur

Use the LIKE condition to perform wildcard searches of valid search string values. Search conditions can contain either literal characters or numbers. You can combine pattern-matching characters. You can use the ESCAPE identifier to search for the actual % and _ symbols. [Read more…] about SQL LIKE Operator

SQL MINUS Operator

By Dinesh Thakur

The MINUS query will compare each record in statement1 to a record in statement2. The result returned will be records in Select Statement1 that are not in Select statement2. [Read more…] about SQL MINUS Operator

SQL NOT NULL

By Dinesh Thakur

By default all columns in a table can contain null values. If you want to ensure that a column must always have a value, i.e. it should not be left blank, then define a NOT NULL constraint on it. [Read more…] about SQL NOT NULL

SQL PRIMARY KEY Constraint

By Dinesh Thakur

The PRIMARY KEY constraint uniquely identifies each record in a database table. Primary keys must contain unique values. A primary key column cannot contain NULL values. Each table should have a primary key, and each table can have only one primary key. [Read more…] about SQL PRIMARY KEY Constraint

SQL UNION Operator

By Dinesh Thakur

In SQL the UNION Clause combines the results of two SQL queries into a single table of all matching rows. The two queries must have the same number of columns and compatible data types to unite. Any duplicate records are automatically removed unless UNION ALL is used. [Read more…] about SQL UNION Operator

SQL UNIQUE Constraint

By Dinesh Thakur

A UNIQUE key integrity constraint requires that every value in a column or set of columns (key) be unique-that is, no two rows of a table have duplicate values in a specified column or set of columns. [Read more…] about SQL UNIQUE Constraint

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