table with no column with some rows inside !!
table with no column with some rows inside !!
От:
Gaetano Mendola <mendola@bigfoot.com>
Дата:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, is it a paradox or not have table with no column but with rows in in ( I mean, we want it ) ? Here a way to obtain it. regression=# select version(); ~ version - ------------------------------------------------------------------------------------------------------------ ~ PostgreSQL 8.0devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1) (1 row) regression=# create table test (); CREATE TABLE regression=# alter table test add column a test; ALTER TABLE kalman=# insert into test values ( null ); INSERT 4260956 1 regression=# alter table test drop column a; ALTER TABLE kalman=# \d test ~ Table "public.test" ~ Column | Type | Modifiers - --------+------+----------- kalman=# select count(*) from test1; ~ count - ------- ~ 0 (1 row) Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBEj1D7UpzwH2SGd4RAqodAJ4jCLtE+RcvRljx78d+1Hi4rHJlqwCgvn+L 2a9bO/uLtg8YQcxGedKF/pA= =XmkI -----END PGP SIGNATURE-----
Re: table with no column with some rows inside !!
От:
"Merlin Moncure" <merlin.moncure@rcsonline.com>
Дата:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all, > is it a paradox or not have table with no column but with rows in in > ( I mean, we want it ) ? > > Here a way to obtain it. It's even easier than that actually; create table test(); insert into test default values; insert into test default values; insert into test default values; select * from test; -- (3 rows) I think it's kind of cool. Merlin