tags:

views:

12

answers:

1

Dear all, Using sequence we can insert a sequence of integers in postgers
like that I just want to insert A1 and A2 , Is this possible to do this in a straight forward manner , or otherwise do need to write a function ?

Please let me know the easiest way of doing this Thanks in advance !

+1  A: 
  • create table test ( a text );
CREATE TABLE
  • insert into test(a) select 'A'||generate_series(1,4)::text;
INSERT 0 4
  • select * from test;
 a  
----
 A1
 A2
 A3
 A4
(4 rows)

Tometzky