Sql Tutorial Blog Posts

Create a Table from another Table in Oracle SQL

In my previous article, you have seen how to create a Table and Global Temporary Table in Oracle. In this article, you will learn how to create a table from another table. 1) How to create a Table from an Existing Table? 2) How to create a Table from...
by IT Blogger Tips on Nov 23, 2013

Create Normal Table and Global Temporary Table in Oracle

We can create two types of Table in Oracle. 1) Normal Table (CREATE TABLE Command) 2) Global Temporary Table (CREATE GLOBAL TEMPORARY TABLE Command) How to create a Normal Table in Oracle? The create table command allows you to create normal table in...
by IT Blogger Tips on Nov 22, 2013

Alter Table Command in Oracle SQL

The ALTER TABLE command allows you to rename an existing Oracle table to a new table. The same command can also be used to add, modify, or drop a column from an existing Oracle table. How to Alter a Table in Oracle? Syntax to rename a table: ALTER TA...
by IT Blogger Tips on Nov 21, 2013

How to Create Index in Oracle SQL with Example

What is an Index? Index is created on existing tables to retrieve data more quickly. This is a performance tuning method for faster retrieval of records from a table. By default oracle creates B-tree indexes when you create an index on a table. If yo...
by IT Blogger Tips on Nov 10, 2013

NVL, DECODE, NVL2, COALESCE-NULL Functions in Oracle

This article will provide you a summary of the NULL functions available for handling null values in Oracle. All examples are described with the use of following table. CREATE TABLE TEST_NULL_VALUE ( test_id NUMBER(4), value1 VARCHAR2(12), value2 VARC...
by IT Blogger Tips on Nov 9, 2013

SQL Tips: LAG and LEAD Analytic Functions

LAG and LEAD functions can be used in Oracle PL/SQL and apply on Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i versions. Let’s understand the difference between LAG and LEAD analytical functions in Oracle. First create a table called...
by IT Blogger Tips on Nov 7, 2013

How to Escape Special Characters in Oracle SQL queries

Whether you are working as PL/SQL developer or ETL developer or Data Warehousing Developer or using SQL and PL/SQL, you must know about how to escape special characters in SQL queries. In the article, you will learn: 1) How to escape ampersand (&...
by IT Blogger Tips on Nov 3, 2013

Transpose Rows to Columns and Columns to Rows in Oracle

This is the most popular question asked in an interview as well as over the internet. How to transpose rows to columns in SQL? How to transpose columns to rows in SQL? How to create PIVOT table in SQL? How to Create a Matrix in SQL? We can Transpose...
by IT Blogger Tips on Nov 2, 2013

SQL: OR Command

In SQL, we have seen the use of AND command, to set multiple condition when performing a database transaction. But when we use AND, that means it's a mandatory condition. The transaction will provide output, only when all the conditions will be satis...
by JAVA INTERVIEW QUESTIONS on Mar 17, 2013

SQL: AND Command

In SQL, we have, seen that, we can add conditions by using WHERE command, during any SELECT, UPDATE or DELETE operation. Now, what about multiple conditions? For that, SQL provides to add multiple condition by using AND command. it can be used a...
by JAVA INTERVIEW QUESTIONS on Feb 28, 2013

SQL: SELECT Command

SELECT command is use in SQL to "SELECT [some info] FROM [a location]".  Now, this is the basic structure of the SELECT query, where SELECT and FROM are 2 commands of SQL. Here, [some info] part will be the column names separated by comma (,) si...
by JAVA INTERVIEW QUESTIONS on Feb 17, 2013

SQL: What is SQL

  SQL (Structured Query Language) is a type of programming language, which uses to communicate with database. It’s also known as “sequel”. It provides some syntax which helps you to interact with a database. These syntaxes are very similar...
by JAVA INTERVIEW QUESTIONS on Feb 13, 2013
Close