From: | volunteer(at)spatiallink(dot)org |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: an other provokative question?? |
Date: | 2007-09-12 23:06:41 |
Message-ID: | 20070912160641.b22b5ede89d48a4249261b5ab56693f4.2209e43a4a.wbe@email.secureserver.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
howto check column than row??
create table horizontal (id integer, first varchar(8), last varchar(8));
insert into horizontal values ('1', 'Jack', 'Ja');
insert into horizontal values ('2', 'Jill', 'Ji');
insert into horizontal values ('3', 'Mary', 'Ma');
select * from horizontal where true;
+----+-------+-------+
| id | first | last |
+----+-------+-------+
| 1 | Jack | Ja |
| 2 | Jill | Ji |
| 3 | Mary | Ma |
+----+-------+-------+
(3 rows)
#
create table vertical (id varchar(8), one varchar(8));
insert into vertical values ('first', 'Jack');
insert into vertical values ('last', 'Ja');
alter table vertical add column two varchar(8);
update vertical set two = 'Jill' where id = 'first';
update vertical set two = 'Ji' where id = 'last';
alter table vertical add column three varchar(8);
update vertical set three = 'Mary' where id = 'first';
update vertical set three = 'Ma' where id = 'last';
select * from vertical where true;
+-------+-------+------+-------+
| id | one | two | three |
+-------+-------+------+-------+
| first | Jack | Jill | Mary |
| last | Ja | Ji | Ma |
+-------+-------+------+-------+
(2 rows)
#
select * from horizontal where last like 'J%' order by last;
+----+-------+-------+
| id | first | last |
+----+-------+-------+
| 1 | Jack | Ja |
| 2 | Jill | Ji |
+----+-------+-------+
(2 rows)
howto get flip result from vertical??
sincerely
siva
-------- Original Message --------
Subject: [GENERAL] an other provokative question??
From: volunteer(at)spatiallink(dot)org
Date: Thu, September 06, 2007 3:32 pm
To: pgsql-general(at)postgresql(dot)org
Relational database pioneer says technology is obsolete
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9034619
kindlt explain how??
sincerely
siva
From | Date | Subject | |
---|---|---|---|
Next Message | Cultural Sublimation | 2007-09-12 23:09:25 | Re: Cannot declare record members NOT NULL |
Previous Message | Alvaro Herrera | 2007-09-12 23:03:43 | Re: Cannot declare record members NOT NULL |