Create Syntax (easy)

Create Syntax (easy)

am 29.09.2009 18:09:02 von Victor Subervi

--000e0cd5ce440262f40474b9a203
Content-Type: text/plain; charset=ISO-8859-1

Hi;
Please give me the syntax below such that I can force the insert statements
to use only selected values ("item1", "item2", "item3"):

create table (field SOMETHING_HERE item1 item2 item3,
....
)

TIA,
Victor

--000e0cd5ce440262f40474b9a203--

Re: Create Syntax (easy)

am 29.09.2009 18:13:21 von David Giragosian

--0016e64b95b67030c30474b9b138
Content-Type: text/plain; charset=UTF-8

On Tue, Sep 29, 2009 at 11:09 AM, Victor Subervi wrote:

> Hi;
> Please give me the syntax below such that I can force the insert statements
> to use only selected values ("item1", "item2", "item3"):
>
> create table (field SOMETHING_HERE item1 item2 item3,
> ...
> )
>
> TIA,
> Victor
>


CREATE TABLE set_test(
rowid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
myset SET('Travel','Sports','Dancing','Fine Dining')
);
From: http://dev.mysql.com/tech-resources/articles/mysql-set-datat ype.html

David

--

There is more hunger for love and appreciation in this world than for
bread.- Mother Teresa

--0016e64b95b67030c30474b9b138--

Re: Create Syntax (easy)

am 29.09.2009 18:16:47 von Victor Subervi

--0016e64bd5bcc00aa20474b9bdca
Content-Type: text/plain; charset=ISO-8859-1

That's it! Thanks,
V

On Tue, Sep 29, 2009 at 12:13 PM, David Giragosian wrote:

> On Tue, Sep 29, 2009 at 11:09 AM, Victor Subervi > >wrote:
>
> > Hi;
> > Please give me the syntax below such that I can force the insert
> statements
> > to use only selected values ("item1", "item2", "item3"):
> >
> > create table (field SOMETHING_HERE item1 item2 item3,
> > ...
> > )
> >
> > TIA,
> > Victor
> >
>
>
> CREATE TABLE set_test(
> rowid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
> myset SET('Travel','Sports','Dancing','Fine Dining')
> );
> From: http://dev.mysql.com/tech-resources/articles/mysql-set-datat ype.html
>
> David
>
> --
>
> There is more hunger for love and appreciation in this world than for
> bread.- Mother Teresa
>

--0016e64bd5bcc00aa20474b9bdca--