Which of the follow...
 
Notifications
Clear all

Which of the following string manipulation commands will combine the address and region name columns to create a full address?

1 Posts
1 Users
0 Likes
35 Views
Lloyd
(@salterslloyd)
Noble Member
Joined: 6 months ago
Posts: 375
Topic starter  

Consider the following dataset which contains information about houses that are for sale:

Which of the following string manipulation commands will combine the address and region name columns to create a full address?

full_address------------------------- 85 Turner St, Northern Metropolitan 25 Bloomburg St, Northern Metropolitan 5 Charles St, Northern Metropolitan 40 Federation La, Northern Metropolitan 55a Park St, Northern Metropolitan

  • A . SELECT CONCAT(address, ' , ' , regionname) AS full_address FROM melb LIMIT 5;
  • B . SELECT CONCAT(address, '-' , regionname) AS full_address FROM melb LIMIT 5;
  • C . SELECT CONCAT(regionname, ' , ' , address) AS full_address FROM melb LIMIT 5
  • D . SELECT CONCAT(regionname, '-' , address) AS full_address FROM melb LIMIT 5;

Show Answer Hide Answer

Suggested Answer: A

Explanation:

The correct answer is A: SELECT CONCAT(address, ' , ' , regionname) AS full_address FROM melb LIMIT 5; String manipulation (or string handling) is the process of changing, parsing, splicing, pasting, or analyzing strings. SQL is used for managing data in a relational database. The CONCAT() function adds two or more strings together. Syntax CONCAT(stringl, string2,... string_n) Parameter Values Parameter Description stringl, string2, string_n Required. The strings to add together.

   
Quote
Topic Tags
Share: