Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

concatenate two strings in sql

-- method 1
select format('Hello, %s how are you doing today?', name) from person;
-- method 2
Select 'Hello, ' || person.name || ' how are you doing today?' from person;
-- method 3
Select Concat ('Hello, ', name, ' how are you doing today?') From person;
-- method 4
SELECT REPLACE(
  'Hello, <name> how are you doing today?',
  '<name>', name
) FROM person;
Source by database.guide #
 
PREVIOUS NEXT
Tagged: #concatenate #strings #sql
ADD COMMENT
Topic
Name
8+1 =