Different Types of SQL Keys | Learn SQL

Types of SQL Keys A key is a single or combination of multiple fields in a table. Its is used to retrieve records or rows from data table according to the condition/requirement. Keys are also used to create relationship among different database tables or views. Below are different SQL Keys. Super Key Candidate Key Primary Key Alternate key Composite/Compound Key

Continue reading »

SQL Joins | JOIN Syntax | JOIN Differences | Learn SQL

SQL Joins What is SQL Joins? An SQL JOIN clause combines results from two or more tables. It creates a set of rows in a temporary table. SQL Joins is used for combining column from two or more tables by using values common in both tables. Join Keyword is used for joining of tables. Types of Join Inner join Outer

Continue reading »

SQL CREATE TABLE | Learn SQL

SQL CREATE TABLE SQL Create Table is used to create and define a table (Design) in database. If you want to create a table then first you give name of table then specify column name and data types of particular column, you can also specify constraints like primary key, foreign key, unique key etc. How to create table using query?

Continue reading »

SQL Order By Clause | Sorting Data in SQL | Learn SQL

SQL Order By SQL Order by clause is used with Select command or statement for arranging retrieved data in sorted order based on one or more columns. The Order by clause by default sort data in ascending order it means A–>Z, To sort data in descending order DESC keyword is used with Order by clause. Syntax The syntax for the

Continue reading »

SQL WHERE Clause, Where Condition in Query | Learn SQL

SQL WHERE Clause The SQL WHERE Clause is used when you want to retrieve specific or particular information from a database table excluding other irrelevant data. For example, when you want to see the information about employees in production department only then you do not need the information about the employees in other departments. Retrieving information about all the employees would

Continue reading »

SQL DELETE | Delete Rows in SQL | Learn SQL

SQL Delete The SQL DELETE Statement is used to delete data (rows)  from a table. we can say it is used to remove records from a table. Note: DELETE FROM command cannot delete any rows of data that would violate FOREIGN KEY or other constraints. Syntax of a SQL DELETE Statement

Note: The WHERE clause in the sql delete command

Continue reading »

SQL UPDATE Query | UPDATE With Multiple Columns | UPDATE With joins

SQL Update Query The SQL UPDATE Statement or Query is used to modify the existing records or rows in a table or we can say UPDATE is used to modify data in a database table. Syntax for SQL UPDATE is:

In the Update statement, WHERE clause identifies the rows that get affected by particular condition. If you do not

Continue reading »

SQL INSERT INTO Query | INSERT Command in SQL | Insert Statement in SQL

SQL INSERT INTO Statement The SQL INSERT statement is used to insert a one or more records in a table. There are two syntax’s for the INSERT statement depending on whether you are inserting one record or multiple records. Syntax It will work, when we inserting a single record in SQL. While inserting a row, if you are adding value

Continue reading »

SQL Select Query and Use of Select Command | Learn DBMS | Tech-Mirror

SQL SELECT Query SQL SELECT Query is used to getting or  retrieve data from a table in the database. It is most commonly and highly used SQL statement in DBMS. A query may give result from specified columns or from all of the columns in the table. To create a simple SQL SELECT Statement, you must specify the column(s) name

Continue reading »

What is SQL? | List of SQL Commands | SQL Queries

What is SQL? SQL (Structured Query Language) is used to perform operations on the records stored in database like creating and modifying tables, updating records, deleting records, views, functions etc. Structured Query Language is just a query language, it is not a database or tables. To perform SQL queries, first you need to install any database for example Oracle, MySQL, MongoDB, PostGre

Continue reading »