SQL

Category Archives: SQL

100+ SQL Query Interview Questions With Answers-II

Before this, we have seen 100+ SQL Interview Questions with Examples -I 41. Get employee details from employee table whose employee name is “John”

  42. Get employee details from employee table whose employee name are “John” and “Roy”

  43. Get employee details from employee table whose employee name are not “John” and “Roy”

Continue reading 100+ SQL Query Interview Questions With Answers-II

100+ SQL Query Interview Questions With Answers-I

Let’s see, SQL Interview questions and answers or SQL query interview questions and answers. 1. How to select all records from the table? To select all the records from the table we need to use the following syntax:

  2. SQL Query to find second highest salary of Employee? There are many ways to find second … Continue reading 100+ SQL Query Interview Questions With Answers-I

ALTER Table in SQL

Let’s see, How can you Alter table in SQL. In SQL, ALTER  statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE command is used to change the structure of an existing table. It helps to add or delete columns, create or destroy indexes, change the type of existing columns, … Continue reading ALTER Table in SQL

Roles in ORACLE

In this tutorial, We will learn how can we create the Roles in Oracle. Administration of large numbers of objects can be difficult. Oracle roles allow you to localize the administration of objects. Oracle roles are most helpful when large numbers of users will need the same system and object privileges.   We need DBA access … Continue reading Roles in ORACLE

Create USER in ORACLE

In this tutorial, We will learn how can you create User in Oracle. We n the ed DBA account to create the users in Oracle. Each database user is assigned a unique username.   Users will log into the database using that username, and have logged in, users can issue various database SQL statements to create … Continue reading Create USER in ORACLE

INDEX in SQL

In this tutorial, We will learn about the INDEX in SQL. Indexes allow the database application to find data fast; without reading the whole table. A Unique index is created automatically when you define a PRIMARY KEY or UNIQUE constraints in a table definition or user can create Index manually to speed up the access … Continue reading INDEX in SQL

SEQUENCE in SQL

In this tutorial, We will learn about the SEQUENCE in SQL. Sequence is a feature supported by some database systems to produce unique values on demand.   The sequence in Automatically generated the unique number. It is a shareable object in DB. We can use SEQUENCE to create PRIMARY KEY in the database.   Syntax … Continue reading SEQUENCE in SQL

UPDATE VIEW in SQL

In this tutorial, We will see how can we update the VIEW in SQL. The SQL UPDATE VIEW command can be used to modify the data of a view.   All views are not updatable. So, UPDATE command is not applicable to all views. An updatable view is one which allows performing an UPDATE command … Continue reading UPDATE VIEW in SQL

View in SQL

First, Let’s understand what is VIEW in SQL? A VIEW is a data object in SQL which does not contain any data. Its contents are the resultant of a base table. They are operated just like the base table but they don’t contain any data of their own.   A view can be accessed with … Continue reading View in SQL

What is Constraints in SQL

Let’s understand, What is Constraints in SQL. SQL Constraints are used to enforce the rules on the table. Constraints have also prevented the deletion of a table if there are dependencies. Constraints can be specified when the table is created or after the table is created.   SQL Syntax : SQL > CREATE TABLE table_name ( column_name1 data_type(size) constraint_name, column_name2 … Continue reading What is Constraints in SQL