Category Archives: SQL

How to Escape Special Characters in Oracle SQL queries

escape special characters in oracle sql

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 (&) characters in SQL? 2) How to escape wildcard characters in SQL? 3)

Transpose Rows to Columns and Columns to Rows in Oracle

transpose rows to columns

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 Rows to Columns and Columns to

Difference Between DDL, DML and DCL Commands

DDL, DML and DCL

This is the most important question asked in an interview. How to differentiate DDL, DML and DCL commands? What are DDL commands? DDL – Data Definition Language commands are used to define the structure or schema of a database. There are many DDL commands like below: CREATE: This command is used to create database objects

How to Delete Duplicate Rows from a Table

Delete Duplicate Rows from a Table

How to remove duplicate records from a Table? If you want to remove duplicate rows from a Table and want to leave only unique records in a Table then choose any one of the following method to delete duplicate rows. Method-1: SQL> DELETE FROM SAMPLE A WHERE ROWID > (SELECT MIN(ROWID) FROM SAMPLE B WHERE

What is the Difference between Truncate and Delete in Oracle

Difference Between Truncate and Delete

First create a Table using following command on SQL> prompt. CREATE TABLE SAMPLE (ID NUMBER, NAME VARCHAR2(20),CITY VARCHAR2(15), ADDRESS VARCHAR2(50)); Now insert three records into SAMPLE table using following command. INSERT INTO SAMPLE VALUES (1,’AMIT KUMAR’,’DELHI’,’MAIN MARKET, DELHI’); INSERT INTO SAMPLE VALUES (2,’SUDHIR MALHOTRA’,’AGRA’,’ALIBAGH’); INSERT INTO SAMPLE VALUES (3,’DEVANG MEHRA’,’ALIGARH’,’NEAR RLY. ST.’); Don’t forget to

SQL Tutorial

Oracle SQL Tips

SQL (pronounced as “ess-que-el”) stands for Structured Query Language. SQL is used to modify and access data from a database and is used by most common relational database management systems like Oracle, Sybase, Microsoft SQL Server, Access, etc. <—– SQL Tutorial —–> SQL Interview Questions and Answers – 1 Difference Between DDL, DML and DCL

SQL Interview Questions and Answers – 1

In this article I have posted SQL interview questions and answers for my visitors to help them in learning basic SQL. How to connect with Oracle Database C:>sqlplus /nolog SQL*Plus: Release 11.2.0.2.0 Production on Thu May 16 16:22:56 2013 Copyright (c) 1982, 2010, Oracle.  All rights reserved. SQL> conn sys/sys@test as sysdba Connected. How to

How to export data from Oracle Table to Excel sheet in Java Script

You have searched over the internet about how to export oracle table to excel using java script. I am posting this article to give you complete source code to export data from oracle to excel. Follow the below mentioned steps and use the below mentioned code. Step-1: In body section, first you have to define

Siteground SALE
60% OFF SiteGround WordPress Hosting – $3.95/month (Exclusive Offer !!!)