SlideShare una empresa de Scribd logo
1 de 22
P2CINFOTECH
www.p2cinfotech.com
Contact : +1-732-546-3607
Email id:training@p2cinfotech.com
IT Online Training and Placement
(QA, BA, QTP, JAVA, Mobile apps..)
Mock interviews.
100% job Placement assistance.
Free Training for Opt/MS Students.
Placement with one of our Fortune 500 clients.
Live Instructor Led Face2Face Online Training.
SQL FOR ETL TESTING
 What is Web Services?
It is a middleware developed in XML. Exchange the data between multiple
platforms.
 What is web services?
It is middleware technology developed in XML to exchange the data between
multiple platforms and languages.
 what is rest protocol ?
REST stands for Representational State Transfer. (It is sometimes spelled
"ReST".)
EST is a lightweight alternative to mechanisms like RPC (Remote Procedure
Calls) and Web Services (SOAP, WSDL, et al.). Later, we will see how much
more simple REST is.
Despite being simple, REST is fully-featured; there's basically nothing you can do
in Web Services that can't be done with a RESTful architecture.
REST is not a "standard". There will never be a W3C recommendation for REST,
for example. And while there are REST programming frameworks, working with
REST is so simple that you can often "roll your own" with standard library
features in languages like Perl, Java, or C#.
P2cinfotech.com
 In Interviews they ask do you have work experience in web based
applications, does that mean having experience in web services in
SOAPUI ?
Ans: NO
 What is synchronous web services? -- get response immediately.
 What is asynchronous web services? --Response will be sent when the
service is available.
 What is SOAPUI? It is a tool to test the Web Services.
 what is xml schema?-- XML schema is well defined xml structure. It is w3
standards.
+1-732-546-3607
P2cinfotech.com
 9). In Interviews if they ask do you have work experience in
web based applications, does that mean having experience
in web services in soapUI?
Ans: NO.
Create a table:
CREATE TABLE customer
(First_Namechar (50),
Last_Namechar(50),
Address char(50),
City char(50),
Country char(25),
Birth_Date date) ;
+1-732-546-3607
P2cinfotech.com
2. Add a column to a table:
ALTER TABLE customer ADD SO_INSURANCE_PROVIDER
Varchar2(35);
3. DROP a column to a table
ALTER TABLE customer DROP column
SO_INSURANCE_PROVIDER
Varchar2(35);
4. Add a default value to a column
ALTER TABLE customer MODIFY SO_INSURANCE_PROVIDER
Varchar2(35) DEFAULT 'ABC Ins';
5. Renaming a table:
ALTER TABLE suppliers RENAME TO vendors;
+1-732-546-3607
P2cinfotech.com
6. Modifying column(s) in a table:
ALTER TABLE supplier MODIFY supplier_namevarchar2(100)
not null;
7. Drop column(s) in a table:
ALTER TABLE supplier DROP COLUMN supplier_name;
8. Primary key:
CREATE TABLE supplier
(
supplier_id numeric(10) not null,
supplier_namevarchar2(50) not null,
contact_namevarchar2(50),
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id,
supplier_name)
);
+1-732-546-3607
P2cinfotech.com
 Add primary key:
ALTER TABLE supplier add CONSTRAINT supplier_pk
PRIMARY KEY
(supplier_id);
 Drop primary key:
ALTER TABLE supplier drop CONSTRAINT supplier_pk;
 Disable primary key:
ALTER TABLE supplier disable CONSTRAINT supplier_pk;
 Enable primary key:
ALTER TABLE supplier enable CONSTRAINT supplier_pk;
+1-732-546-3607
 Foreign key creation:
CREATE TABLE supplier
(
supplier_id numeric(10) not null,
supplier_namevarchar2(50) not null,
contact_namevarchar2(50),
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
);
CREATE TABLE products
(
product_id numeric(10) not null,
supplier_id numeric(10) not null,
CONSTRAINT fk_supplier
FOREIGN KEY (supplier_id)
REFERENCES supplier(supplier_id)
);
+1-732-546-3607
14. More than column :
CREATE TABLE supplier
(
supplier_id numeric(10) not null,
supplier_namevarchar2(50) not null,
contact_namevarchar2(50),
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id, supplier_name)
);
CREATE TABLE products
(
Product_id numeric (10) not null,
Supplier_id numeric (10) not null,
supplier_name varchar2 (50) not null,
CONSTRAINT fk_supplier_comp
FOREIGN KEY (supplier_id, supplier_name)
REFERENCES supplier (supplier_id, supplier_name)
);
P2CINFOTECH.COM +1-732-546-3607
Alter foreign key:
ALTER TABLE products add CONSTRAINT fk_supplier FOREIGN KEY
(supplier_id) REFERENCES supplier (supplier_id);
Drop foreign key:
ALTER TABLE SALES_ORDER_LINE DROP FOREIGN KEY
FK_SALES_ORDER_LINE_PRODUCT
Check constraint:
ALTER TABLE EMPLOYEE ADD CONSTRAINT REVENUE CHECK
(SALARY + COMM > 25000)
Drop check constraint:
ALTER TABLE EMPLOYEE DROP CONSTRAINT REVENUE CHECK
(SALARY + COMM > 25000)
19. Drop Table:
DROP TABLE customer;
P2CINFOTECH.COM +1-732-546-3607
 Truncate Statement:
Truncate table customer;
*********************************************************************End of DDL
Statements*********************************************************************
**
****************************************************************** DML
Statements
***************************************************************************
Insert rows in table:
1) INSERT INTO Store_Information (store_name, Sales, Date)
VALUES ('Los Angeles', 900, 'Jan-10-1999')
2) INSERT INTO Store_Information (store_name, Sales, Date) SELECT
store_name, Sales, Date FROM Sales_Info WHERE Year
(Date) = 1998
P2CINFOTECH.COM +1-732-546-3607
Update Statement in table:
UPDATE suppliers SET name = 'HP' WHERE name =
'IBM';
UPDATE suppliers
SET supplier_name =
(SELECT customers.name
FROM customers
WHERE customers. customer_id = suppliers.
supplier_id);
P2CINFOTECH +1-732-546-3607
24. Delete Statement in table:
25 DELETE FROM suppliers WHERE
supplier_name = 'IBM';
26 DELETE FROM suppliers
WHERE EXISTS
( select customers.name
from customers
wherecustomers.customer_id =
suppliers.supplier_id
andcustomers.customer_name = 'IBM' );
************************** select statement
P2CINFOTECH.COM +1-732-546-3607
Select Statement in table:
1. SELECT LastName, FirstName FROM Persons;
2. SELECT * FROM Persons;
The SELECT DISTINCT Statement:
SELECT DISTINCT Company FROM Orders;
The WHERE Clause:
SELECT * FROM Persons WHERE City='Sandnes‘
Using LIKE
SELECT * FROM Persons WHERE FirstName LIKE 'O%'
P2CINFOTECH.COM +1-732-546-3607
31. Arithmetic Operation:
Operator Description
= Equal
<> Not equal
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
BETWEENBetween an inclusive range
LIKE Search for a pattern
IN If you know the exact value you
want to return for at least one of the
columns
P2CINFOTECH.COM +1-732-546-3607
BETWEEN ... AND:
SELECT * FROM Persons WHERE LastName
BETWEEN 'Hansen' AND
'Pettersen';
IN
SELECT * FROM Persons WHERE LastName IN
('Hansen','Pettersen');
Column Name Alias
SELECT LastName AS Family, FirstName AS Name
FROM Persons
P2CINFOTECH.COM +1-732-546-3607
AND & OR
SELECT * FROM Persons WHERE FirstName='Tove' AND
LastName='Svendson'
SELECT * FROM Persons WHERE firstname='Tove' OR
lastname='Svendson'
ORDER BY
SELECT Company, OrderNumber FROM Orders ORDER
BY Company
SELECT Company, OrderNumber FROM Orders ORDER
BY Company
DESC, OrderNumber ASC
P2CINFOTECH.COM +1-732-546-3607
Group by Clause:
SELECT Company, SUM (Amount) FROM Sales GROUP BY
Company;
Having Clause:
SELECT Company, SUM (Amount) FROM Sales GROUP BY
Company
HAVING SUM (Amount)>10000;
Using UNION Clause:
SELECT E_Name FROM Employees_Norway
UNION
SELECT E_Name FROM Employees_USA
P2CINFOTECH.COM +1-732-546-3607
UNION ALL Clause:
SELECT E_Name FROM Employees_Norway
UNION ALL
SELECT E_Name FROM Employees_USA
JOINS:
Referring to Two Tables:
SELECT Employees.Name, Orders.Product
FROM Employees, Orders
WHERE Employees.Employee_ID=Orders.Employee_ID
INNER JOIN:
SELECT Employees.Name, Orders.Product
FROM Employees
INNER JOIN Orders
ON Employees.Employee_ID=Orders.Employee_ID;
P2CINFOTECH.COM +1-732-546-3607
LEFT JOIN:
SELECT Employees.Name, Orders.Product
FROM Employees
LEFT JOIN Orders
ON Employees.Employee_ID=Orders.Employee_ID;
RIGHT JOIN:
SELECT Employees.Name, Orders.Product
FROM Employees
RIGHT JOIN Orders
ON Employees.Employee_ID=Orders.Employee_ID;
P2CINFOTECH.COM +1-732-546-3607
Subqueries:
1) Select distinct country from Northwind.dbo.Customers
where country not in (select distinct country from
Northwind.dbo.Suppliers);
2) Select top 1 OrderId, convert (char (10),
OrderDate, 121) Last_Paris_Order,
(Select convert (char (10), max (OrderDate), 121) from
Northwind.dbo.Orders) Last_OrderDate,
datediff(dd,OrderDate,
(select Max(OrderDate) from Northwind.dbo.Orders))
Day_Diff
fromNorthwind.dbo.Orders
whereShipCity = 'Paris' order by OrderDatedesc;
P2CINFOTECH.COM +1-732-546-3607
Commit & Rollback Statements:
1) UPDATE suppliers SET name = 'HP' WHERE name
= 'IBM';
Commit;
2) UPDATE suppliers SET name = 'HP' WHERE name
= 'IBM';
Rollback;
SavepointStatement:
INSERT INTO DEPARTMENT VALUES ('A20', 'MARKETING',
301);
SAVEPOINT SAVEPOINT1;
INSERT INTO DEPARTMENT VALUES ('B30', 'FINANCE', 520);
SAVEPOINT SAVEPOINT2;

Más contenido relacionado

La actualidad más candente

SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query OptimizationBrian Gallagher
 
Difference between all topics in oracle
Difference between all topics in oracleDifference between all topics in oracle
Difference between all topics in oraclePraveenRaj280263
 
JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)Faysal Shaarani (MBA)
 
Oracle basic queries
Oracle basic queriesOracle basic queries
Oracle basic queriesPRAKHAR JHA
 
Where conditions and Operators in SQL
Where conditions and Operators in SQLWhere conditions and Operators in SQL
Where conditions and Operators in SQLMSB Academy
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQLGary Myers
 
İleri Seviye T-SQL Programlama - Chapter 11
İleri Seviye T-SQL Programlama - Chapter 11İleri Seviye T-SQL Programlama - Chapter 11
İleri Seviye T-SQL Programlama - Chapter 11Cihan Özhan
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL CommandsShrija Madhu
 
Sub query_SQL
Sub query_SQLSub query_SQL
Sub query_SQLCoT
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Stamatis Zampetakis
 

La actualidad más candente (20)

SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
ETL QA
ETL QAETL QA
ETL QA
 
advanced sql(database)
advanced sql(database)advanced sql(database)
advanced sql(database)
 
Oraclesql
OraclesqlOraclesql
Oraclesql
 
Difference between all topics in oracle
Difference between all topics in oracleDifference between all topics in oracle
Difference between all topics in oracle
 
Etl testing
Etl testingEtl testing
Etl testing
 
Oracle SQL Advanced
Oracle SQL AdvancedOracle SQL Advanced
Oracle SQL Advanced
 
JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)JSON Data Parsing in Snowflake (By Faysal Shaarani)
JSON Data Parsing in Snowflake (By Faysal Shaarani)
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
 
Sql loader good example
Sql loader good exampleSql loader good example
Sql loader good example
 
Oracle basic queries
Oracle basic queriesOracle basic queries
Oracle basic queries
 
Where conditions and Operators in SQL
Where conditions and Operators in SQLWhere conditions and Operators in SQL
Where conditions and Operators in SQL
 
Quick_sort1.pptx
Quick_sort1.pptxQuick_sort1.pptx
Quick_sort1.pptx
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQL
 
İleri Seviye T-SQL Programlama - Chapter 11
İleri Seviye T-SQL Programlama - Chapter 11İleri Seviye T-SQL Programlama - Chapter 11
İleri Seviye T-SQL Programlama - Chapter 11
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
PL/SQL TRIGGERS
PL/SQL TRIGGERSPL/SQL TRIGGERS
PL/SQL TRIGGERS
 
ARIES Recovery Algorithms
ARIES Recovery AlgorithmsARIES Recovery Algorithms
ARIES Recovery Algorithms
 
Sub query_SQL
Sub query_SQLSub query_SQL
Sub query_SQL
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 

Similar a SQL for ETL Testing

Introducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSONIntroducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSONKeshav Murthy
 
Advanced app building with PowerApps expressions and rules
Advanced app building with PowerApps expressions and rulesAdvanced app building with PowerApps expressions and rules
Advanced app building with PowerApps expressions and rulesMicrosoft Tech Community
 
Big Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsBig Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsFujio Turner
 
Integrating Force.com with Heroku
Integrating Force.com with HerokuIntegrating Force.com with Heroku
Integrating Force.com with HerokuPat Patterson
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Appsdreamforce2006
 
ELEVATE Advanced Workshop
ELEVATE Advanced WorkshopELEVATE Advanced Workshop
ELEVATE Advanced WorkshopJoshua Birk
 
Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Joshua Birk
 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications Keshav Murthy
 
How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019Paul Shapiro
 
On SQL Managment studioThis lab is all about database normalizatio.pdf
On SQL Managment studioThis lab is all about database normalizatio.pdfOn SQL Managment studioThis lab is all about database normalizatio.pdf
On SQL Managment studioThis lab is all about database normalizatio.pdfinfomalad
 
Top 100 .NET Interview Questions and Answers
Top 100 .NET Interview Questions and AnswersTop 100 .NET Interview Questions and Answers
Top 100 .NET Interview Questions and AnswersTung Nguyen Thanh
 
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADataconomy Media
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisTorsten Steinbach
 
Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库renguzi
 
Creating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseCreating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseAltinity Ltd
 
7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce PagesSalesforce Developers
 
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...Agile Testing Alliance
 

Similar a SQL for ETL Testing (20)

Introducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSONIntroducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSON
 
Advanced app building with PowerApps expressions and rules
Advanced app building with PowerApps expressions and rulesAdvanced app building with PowerApps expressions and rules
Advanced app building with PowerApps expressions and rules
 
Big Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsBig Data for Small Businesses & Startups
Big Data for Small Businesses & Startups
 
Integrating Force.com with Heroku
Integrating Force.com with HerokuIntegrating Force.com with Heroku
Integrating Force.com with Heroku
 
70433 Dumps DB
70433 Dumps DB70433 Dumps DB
70433 Dumps DB
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
 
ELEVATE Advanced Workshop
ELEVATE Advanced WorkshopELEVATE Advanced Workshop
ELEVATE Advanced Workshop
 
Detroit ELEVATE Track 2
Detroit ELEVATE Track 2Detroit ELEVATE Track 2
Detroit ELEVATE Track 2
 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
 
How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019
 
On SQL Managment studioThis lab is all about database normalizatio.pdf
On SQL Managment studioThis lab is all about database normalizatio.pdfOn SQL Managment studioThis lab is all about database normalizatio.pdf
On SQL Managment studioThis lab is all about database normalizatio.pdf
 
Top 100 .NET Interview Questions and Answers
Top 100 .NET Interview Questions and AnswersTop 100 .NET Interview Questions and Answers
Top 100 .NET Interview Questions and Answers
 
70 433
70 43370 433
70 433
 
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project ADN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
DN 2017 | Reducing pain in data engineering | Martin Loetzsch | Project A
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
 
Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库Oracle OCP 1Z0-007题库
Oracle OCP 1Z0-007题库
 
Creating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseCreating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouse
 
7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages
 
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...
ATAGTR2017 Test Approach for Re-engineering Legacy Applications based on Micr...
 

Más de Garuda Trainings

Short definitions of all testing types
Short definitions of all testing typesShort definitions of all testing types
Short definitions of all testing typesGaruda Trainings
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycleGaruda Trainings
 
Fundamental classes in java
Fundamental classes in javaFundamental classes in java
Fundamental classes in javaGaruda Trainings
 
Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answersGaruda Trainings
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answersGaruda Trainings
 
Business analysis interview question and answers
Business analysis interview question and answersBusiness analysis interview question and answers
Business analysis interview question and answersGaruda Trainings
 
Quality center interview questions and answers
Quality center interview questions and answersQuality center interview questions and answers
Quality center interview questions and answersGaruda Trainings
 
Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycleGaruda Trainings
 
Interview Questions and Answers for Java
Interview Questions and Answers for JavaInterview Questions and Answers for Java
Interview Questions and Answers for JavaGaruda Trainings
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobGaruda Trainings
 
Dot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement onlineDot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement onlineGaruda Trainings
 
Interview questions and answers for quality assurance
Interview questions and answers for quality assuranceInterview questions and answers for quality assurance
Interview questions and answers for quality assuranceGaruda Trainings
 

Más de Garuda Trainings (14)

SAP BI 7.0 Info Providers
SAP BI 7.0 Info ProvidersSAP BI 7.0 Info Providers
SAP BI 7.0 Info Providers
 
Short definitions of all testing types
Short definitions of all testing typesShort definitions of all testing types
Short definitions of all testing types
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 
Fundamental classes in java
Fundamental classes in javaFundamental classes in java
Fundamental classes in java
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answers
 
Loadrunner interview questions and answers
Loadrunner interview questions and answersLoadrunner interview questions and answers
Loadrunner interview questions and answers
 
Business analysis interview question and answers
Business analysis interview question and answersBusiness analysis interview question and answers
Business analysis interview question and answers
 
Quality center interview questions and answers
Quality center interview questions and answersQuality center interview questions and answers
Quality center interview questions and answers
 
Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycle
 
Interview Questions and Answers for Java
Interview Questions and Answers for JavaInterview Questions and Answers for Java
Interview Questions and Answers for Java
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
Dot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement onlineDot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement online
 
Interview questions and answers for quality assurance
Interview questions and answers for quality assuranceInterview questions and answers for quality assurance
Interview questions and answers for quality assurance
 

Último

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 

Último (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

SQL for ETL Testing

  • 1. P2CINFOTECH www.p2cinfotech.com Contact : +1-732-546-3607 Email id:training@p2cinfotech.com IT Online Training and Placement (QA, BA, QTP, JAVA, Mobile apps..) Mock interviews. 100% job Placement assistance. Free Training for Opt/MS Students. Placement with one of our Fortune 500 clients. Live Instructor Led Face2Face Online Training.
  • 2. SQL FOR ETL TESTING  What is Web Services? It is a middleware developed in XML. Exchange the data between multiple platforms.  What is web services? It is middleware technology developed in XML to exchange the data between multiple platforms and languages.  what is rest protocol ? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) EST is a lightweight alternative to mechanisms like RPC (Remote Procedure Calls) and Web Services (SOAP, WSDL, et al.). Later, we will see how much more simple REST is. Despite being simple, REST is fully-featured; there's basically nothing you can do in Web Services that can't be done with a RESTful architecture. REST is not a "standard". There will never be a W3C recommendation for REST, for example. And while there are REST programming frameworks, working with REST is so simple that you can often "roll your own" with standard library features in languages like Perl, Java, or C#.
  • 3. P2cinfotech.com  In Interviews they ask do you have work experience in web based applications, does that mean having experience in web services in SOAPUI ? Ans: NO  What is synchronous web services? -- get response immediately.  What is asynchronous web services? --Response will be sent when the service is available.  What is SOAPUI? It is a tool to test the Web Services.  what is xml schema?-- XML schema is well defined xml structure. It is w3 standards. +1-732-546-3607
  • 4. P2cinfotech.com  9). In Interviews if they ask do you have work experience in web based applications, does that mean having experience in web services in soapUI? Ans: NO. Create a table: CREATE TABLE customer (First_Namechar (50), Last_Namechar(50), Address char(50), City char(50), Country char(25), Birth_Date date) ; +1-732-546-3607
  • 5. P2cinfotech.com 2. Add a column to a table: ALTER TABLE customer ADD SO_INSURANCE_PROVIDER Varchar2(35); 3. DROP a column to a table ALTER TABLE customer DROP column SO_INSURANCE_PROVIDER Varchar2(35); 4. Add a default value to a column ALTER TABLE customer MODIFY SO_INSURANCE_PROVIDER Varchar2(35) DEFAULT 'ABC Ins'; 5. Renaming a table: ALTER TABLE suppliers RENAME TO vendors; +1-732-546-3607
  • 6. P2cinfotech.com 6. Modifying column(s) in a table: ALTER TABLE supplier MODIFY supplier_namevarchar2(100) not null; 7. Drop column(s) in a table: ALTER TABLE supplier DROP COLUMN supplier_name; 8. Primary key: CREATE TABLE supplier ( supplier_id numeric(10) not null, supplier_namevarchar2(50) not null, contact_namevarchar2(50), CONSTRAINT supplier_pk PRIMARY KEY (supplier_id, supplier_name) ); +1-732-546-3607
  • 7. P2cinfotech.com  Add primary key: ALTER TABLE supplier add CONSTRAINT supplier_pk PRIMARY KEY (supplier_id);  Drop primary key: ALTER TABLE supplier drop CONSTRAINT supplier_pk;  Disable primary key: ALTER TABLE supplier disable CONSTRAINT supplier_pk;  Enable primary key: ALTER TABLE supplier enable CONSTRAINT supplier_pk; +1-732-546-3607
  • 8.  Foreign key creation: CREATE TABLE supplier ( supplier_id numeric(10) not null, supplier_namevarchar2(50) not null, contact_namevarchar2(50), CONSTRAINT supplier_pk PRIMARY KEY (supplier_id) ); CREATE TABLE products ( product_id numeric(10) not null, supplier_id numeric(10) not null, CONSTRAINT fk_supplier FOREIGN KEY (supplier_id) REFERENCES supplier(supplier_id) ); +1-732-546-3607
  • 9. 14. More than column : CREATE TABLE supplier ( supplier_id numeric(10) not null, supplier_namevarchar2(50) not null, contact_namevarchar2(50), CONSTRAINT supplier_pk PRIMARY KEY (supplier_id, supplier_name) ); CREATE TABLE products ( Product_id numeric (10) not null, Supplier_id numeric (10) not null, supplier_name varchar2 (50) not null, CONSTRAINT fk_supplier_comp FOREIGN KEY (supplier_id, supplier_name) REFERENCES supplier (supplier_id, supplier_name) );
  • 10. P2CINFOTECH.COM +1-732-546-3607 Alter foreign key: ALTER TABLE products add CONSTRAINT fk_supplier FOREIGN KEY (supplier_id) REFERENCES supplier (supplier_id); Drop foreign key: ALTER TABLE SALES_ORDER_LINE DROP FOREIGN KEY FK_SALES_ORDER_LINE_PRODUCT Check constraint: ALTER TABLE EMPLOYEE ADD CONSTRAINT REVENUE CHECK (SALARY + COMM > 25000) Drop check constraint: ALTER TABLE EMPLOYEE DROP CONSTRAINT REVENUE CHECK (SALARY + COMM > 25000) 19. Drop Table: DROP TABLE customer;
  • 11. P2CINFOTECH.COM +1-732-546-3607  Truncate Statement: Truncate table customer; *********************************************************************End of DDL Statements********************************************************************* ** ****************************************************************** DML Statements *************************************************************************** Insert rows in table: 1) INSERT INTO Store_Information (store_name, Sales, Date) VALUES ('Los Angeles', 900, 'Jan-10-1999') 2) INSERT INTO Store_Information (store_name, Sales, Date) SELECT store_name, Sales, Date FROM Sales_Info WHERE Year (Date) = 1998
  • 12. P2CINFOTECH.COM +1-732-546-3607 Update Statement in table: UPDATE suppliers SET name = 'HP' WHERE name = 'IBM'; UPDATE suppliers SET supplier_name = (SELECT customers.name FROM customers WHERE customers. customer_id = suppliers. supplier_id);
  • 13. P2CINFOTECH +1-732-546-3607 24. Delete Statement in table: 25 DELETE FROM suppliers WHERE supplier_name = 'IBM'; 26 DELETE FROM suppliers WHERE EXISTS ( select customers.name from customers wherecustomers.customer_id = suppliers.supplier_id andcustomers.customer_name = 'IBM' ); ************************** select statement
  • 14. P2CINFOTECH.COM +1-732-546-3607 Select Statement in table: 1. SELECT LastName, FirstName FROM Persons; 2. SELECT * FROM Persons; The SELECT DISTINCT Statement: SELECT DISTINCT Company FROM Orders; The WHERE Clause: SELECT * FROM Persons WHERE City='Sandnes‘ Using LIKE SELECT * FROM Persons WHERE FirstName LIKE 'O%'
  • 15. P2CINFOTECH.COM +1-732-546-3607 31. Arithmetic Operation: Operator Description = Equal <> Not equal > Greater than < Less than >= Greater than or equal <= Less than or equal BETWEENBetween an inclusive range LIKE Search for a pattern IN If you know the exact value you want to return for at least one of the columns
  • 16. P2CINFOTECH.COM +1-732-546-3607 BETWEEN ... AND: SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'; IN SELECT * FROM Persons WHERE LastName IN ('Hansen','Pettersen'); Column Name Alias SELECT LastName AS Family, FirstName AS Name FROM Persons
  • 17. P2CINFOTECH.COM +1-732-546-3607 AND & OR SELECT * FROM Persons WHERE FirstName='Tove' AND LastName='Svendson' SELECT * FROM Persons WHERE firstname='Tove' OR lastname='Svendson' ORDER BY SELECT Company, OrderNumber FROM Orders ORDER BY Company SELECT Company, OrderNumber FROM Orders ORDER BY Company DESC, OrderNumber ASC
  • 18. P2CINFOTECH.COM +1-732-546-3607 Group by Clause: SELECT Company, SUM (Amount) FROM Sales GROUP BY Company; Having Clause: SELECT Company, SUM (Amount) FROM Sales GROUP BY Company HAVING SUM (Amount)>10000; Using UNION Clause: SELECT E_Name FROM Employees_Norway UNION SELECT E_Name FROM Employees_USA
  • 19. P2CINFOTECH.COM +1-732-546-3607 UNION ALL Clause: SELECT E_Name FROM Employees_Norway UNION ALL SELECT E_Name FROM Employees_USA JOINS: Referring to Two Tables: SELECT Employees.Name, Orders.Product FROM Employees, Orders WHERE Employees.Employee_ID=Orders.Employee_ID INNER JOIN: SELECT Employees.Name, Orders.Product FROM Employees INNER JOIN Orders ON Employees.Employee_ID=Orders.Employee_ID;
  • 20. P2CINFOTECH.COM +1-732-546-3607 LEFT JOIN: SELECT Employees.Name, Orders.Product FROM Employees LEFT JOIN Orders ON Employees.Employee_ID=Orders.Employee_ID; RIGHT JOIN: SELECT Employees.Name, Orders.Product FROM Employees RIGHT JOIN Orders ON Employees.Employee_ID=Orders.Employee_ID;
  • 21. P2CINFOTECH.COM +1-732-546-3607 Subqueries: 1) Select distinct country from Northwind.dbo.Customers where country not in (select distinct country from Northwind.dbo.Suppliers); 2) Select top 1 OrderId, convert (char (10), OrderDate, 121) Last_Paris_Order, (Select convert (char (10), max (OrderDate), 121) from Northwind.dbo.Orders) Last_OrderDate, datediff(dd,OrderDate, (select Max(OrderDate) from Northwind.dbo.Orders)) Day_Diff fromNorthwind.dbo.Orders whereShipCity = 'Paris' order by OrderDatedesc;
  • 22. P2CINFOTECH.COM +1-732-546-3607 Commit & Rollback Statements: 1) UPDATE suppliers SET name = 'HP' WHERE name = 'IBM'; Commit; 2) UPDATE suppliers SET name = 'HP' WHERE name = 'IBM'; Rollback; SavepointStatement: INSERT INTO DEPARTMENT VALUES ('A20', 'MARKETING', 301); SAVEPOINT SAVEPOINT1; INSERT INTO DEPARTMENT VALUES ('B30', 'FINANCE', 520); SAVEPOINT SAVEPOINT2;