> On 22 Jan 2015, at 15:54, Pierre Hsieh wrote:
> rule:
> 1. just one column which type is integer in table
> 2. this columns only has 1 and 2 for 50 times as following
>
> 1
> 2
> 1
> 2
> 1
> 2
> 1
> 2
> .
create table test as select b from generate_series(1,50) s1(a),
generate_series(1,2
On 1/22/2015 6:54 AM, Pierre Hsieh wrote:
1. just one column which type is integer in table
2. this columns only has 1 and 2 for 50 times as following
note that tables are unordered sets, the rows of a table have no implied
order.1 1 1 1 1 2 2 2 2 2 is the same table as 1 2 1 2 1 2 1 2 1 2
On Thu, Jan 22, 2015 at 11:59 PM, David G Johnston
wrote:
> Pierre Hsieh wrote
>> 1. just one column which type is integer in table
>> 2. this columns only has 1 and 2 for 50 times as following
> use generate_series(...), the modulus operator (to determine even/odd via
> %2), and +1
Yes, embedded
On 01/22/2015 06:54 AM, Pierre Hsieh wrote:
Hi,
Is there anyone who can help me to create a specific table as following?
Thanks
The commands you will need are here:
http://www.postgresql.org/docs/9.3/interactive/sql-commands.html
In particular:
CREATE TABLE
http://www.postgresql.org/docs/9.
Pierre Hsieh wrote
> Hi,
>
> Is there anyone who can help me to create a specific table as following?
> Thanks
>
> Pierre
>
> rule:
> 1. just one column which type is integer in table
> 2. this columns only has 1 and 2 for 50 times as following
>
> 1
> 2
> 1
> 2
> 1
> 2
> 1
> 2
> .
use gen
Hi,
Is there anyone who can help me to create a specific table as following?
Thanks
Pierre
rule:
1. just one column which type is integer in table
2. this columns only has 1 and 2 for 50 times as following
1
2
1
2
1
2
1
2
.