BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
Chapter 8, Problem 5RQ
Textbook Problem
3 views

How do you concatenate values in character columns in Oracle, Access, and SQL Server?

Explanation of Solution

Concatenating columns in Oracle:

  • User can combine values in character column by using two vertical lines (||).
    • The two vertical lines is placed between the column names.
  • Example for concatenating two columns is given below:

  SELECT STUDENT_ID, RTRIM(FIRST_NAME)||' '||RTRIM(LAST_NAME) AS STUDENT_NAME FROM STUDENT;

  • The above query is used to display the student ID, student name by concatenating the student first name and last name for each student from “STUDENT” table.
    • From the given query, the “RTRIM” means right trim which is used to remove any additional spaces inserted at the end of the value.
    • The “STUDENT_NAME” is computed by combining the first name and last name of student with the help of “AS” operator.

Concatenating columns in Access:

  • User can combine values in character column by using “&” symbol.
    • Since the Access will trim the column automatically, user need not to trim the columns in the table.
  • Example for concatenating two columns is given below:

  SELECT STUDENT_ID, FIRST_NAME&''&LAST_NAME AS STUDENT_NAME FROM STUDENT;

  • The above query is used to display the student ID, student name by concatenating the student first name and last name for each student from “STUDENT” table...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 8 Solutions

A Guide to SQL
Show all chapter solutions
add
Ch. 8 - How do you place the results of a SELECT command...Ch. 8 - Can you use INSERT, UPDATE, or DELETE commands...Ch. 8 - How do you use a SELECT command that retrieves...Ch. 8 - Which PL/SQL command activates a cursor?Ch. 8 - Which PL/SQL command selects the next row in a...Ch. 8 - Which PL/SQL command deactivates a cursor?Ch. 8 - How do you use SQL commands in Access?Ch. 8 - How do you process a collection of rows retrieved...Ch. 8 - How do you move to the next record in a recordset...Ch. 8 - What are triggers? What purpose do they serve?Ch. 8 - What is the purpose of the INSERTED and DELETED...Ch. 8 - When you run the following SQL command, the result...Ch. 8 - Use the TAL Distributors database (see Figure 1-2...Ch. 8 - List the customer number and name for all...Ch. 8 - List the customer number, name, and balance for...Ch. 8 - TAL Distributors is running a promotion that is...Ch. 8 - Write PL/SQL or T-SQL procedures to accomplish the...Ch. 8 - Write PL/SQL or T-SQL procedures to retrieve and...Ch. 8 - Write Access functions to accomplish the following...Ch. 8 - Write a stored procedure in PL/SQL or T-SQL that...Ch. 8 - Write the code for the following triggers in...Ch. 8 - Oracle SQL includes several date and time...Ch. 8 - Use the Colonial Adventure Tours database (see...Ch. 8 - List the trip ID and trip name for all trips that...Ch. 8 - List the reservation ID, trip date, and price for...Ch. 8 - Write PL/SQL or T-SQL procedures to accomplish the...Ch. 8 - Write PL/SQL or T-SQL procedures to retrieve and...Ch. 8 - Write Access functions to accomplish the following...Ch. 8 - Write a stored procedure in PL/SQL or T-SQL that...Ch. 8 - Because the TRIP table contains several columns...Ch. 8 - Use the Solmaris Condominium Group database (see...Ch. 8 - List the owner number and last name for all owners...Ch. 8 - Solmaris is offering a monthly discount for owners...Ch. 8 - Write PL/SQL or T-SQL procedures to accomplish the...Ch. 8 - Write PL/SQL or T-SQL procedures to retrieve and...Ch. 8 - Write Access functions to accomplish the following...Ch. 8 - Write a stored procedure in PL/SQL or T-SQL that...Ch. 8 - SQL includes many numerical functions. Two of...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
What is data independence, and why is it lacking in file systems?

Database Systems: Design, Implementation, & Management

What is physical independence?

Database Systems: Design, Implementation, & Management

Create a table showing wrench sizes in metric and U.S. units.

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

Describe three systems development tools and three development methods.

Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)

Knowing that the resultant of the two forces is directed along AB, determine F2.

International Edition---engineering Mechanics: Statics, 4th Edition

_____ is a small text file that a web server stores on your computer. (192) a. A pop-under blocker b. A cookie ...

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)