Skip to content

Commit

Permalink
Sample Files Chapter 2
Browse files Browse the repository at this point in the history
  • Loading branch information
TexanInParis committed Jul 13, 2016
1 parent a0a8089 commit bdf04df
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
10 changes: 9 additions & 1 deletion IBM DB2/Chapter 02/Listing 2.010.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@

SET SCHEMA Item11Example;

CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);
-- If you've run Listing 2.009.sql, you'll need to drop the index created
-- in that listing, since we re-used the index name.
-- If you have not run Listing 2.009.sql, comment out the DROP INDEX statement.
DROP INDEX CustName ON Customers;

CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);

-- Run the following if you do not want to keep the index.
-- DROP INDEX CustName ON Customers;
5 changes: 4 additions & 1 deletion Microsoft SQL Server/Chapter 02/Listing 2.010.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ GO
-- in that listing, since we re-used the index name.
-- If you have not run Listing 2.009.sql, comment out the DROP INDEX statement.
DROP INDEX CustName ON Customers;

GO
-- Less appropriate Index Creation SQL
CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);

-- Run the following if you do not want to keep the index.
-- DROP INDEX CustName ON Customers;
4 changes: 4 additions & 0 deletions MySQL/Chapter 02/Listing 2.010.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ DROP INDEX CustName ON Customers;

-- Listing 2.10 Less appropriate Index Creation SQL
CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);

-- Run the following if you do not want to keep the index.
-- DROP INDEX CustName ON Customers;

9 changes: 8 additions & 1 deletion Oracle/Chapter 02/Listing 2.010.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

ALTER SESSION SET CURRENT_SCHEMA = Item11Example;

-- If you've run Listing 2.009.sql, you'll need to drop the index created
-- in that listing, since we re-used the index name.
-- If you have not run Listing 2.009.sql, comment out the DROP INDEX statement.
DROP INDEX CustName ON Customers;

-- Less appropriate Index Creation SQL
CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);

DROP INDEX CustName;
-- Run the following if you do not want to keep the index.
-- DROP INDEX CustName ON Customers;
11 changes: 10 additions & 1 deletion PostgreSQL/Chapter 02/Listing 2.010.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@

SET search_path = Item11Example;

CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);
-- If you've run Listing 2.009.sql, you'll need to drop the index created
-- in that listing, since we re-used the index name.
-- If you have not run Listing 2.009.sql, comment out the DROP INDEX statement.
DROP INDEX CustName ON Customers;

-- Less appropriate Index Creation SQL
CREATE INDEX CustName ON Customers(CustFirstName, CustLastName);

-- Run the following if you do not want to keep the index.
-- DROP INDEX CustName ON Customers;

0 comments on commit bdf04df

Please sign in to comment.