Notifications
Clear all
Topic starter
13/09/2022 10:10 pm
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;
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.
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.