I need to generate a SQL query which can generate a column that follows a certain pattern
The pattern is stored like this Hello [Name] [lastname]
where name
and lastname
are both columns on the table.
How do i add a constant string at end, start and indbetween attributes?
and how do distinguish between something being a table column and something just being a string i have added that the column should contain?
My query currently looks like this - and pattern then take
ALTER TABLE IF public.nameRegistration
DROP COLUMN IF EXISTS generated_colum
ADD COLUMN generated_colum TEXT generated ALWAYS as (|Pattern|) stored;
and pattern is just Hello Name lastname