PROTECTED]
Subject: Re: Create table syntax question
eifion herbert (IAH-C) wrote:
Hi,
Probably a very basic question.
I'm trying to a create a table in mySQL 4.0.15 thus:
create table VACANCIES(
VACREF char(6) NOT NULL PRIMARY KEY,
TITLE varchar(60),
LOC varchar(9),
DESC text,
STARTD
enforce RI.
> -Original Message-
> From: Michael Stassen [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2004 16:43
> To: eifion herbert (IAH-C)
> Cc: [EMAIL PROTECTED]
> Subject: Re: Create table syntax question
>
>
>
> eifion herbert (IAH-C) wrote:
>
>
eifion herbert (IAH-C) wrote:
Hi,
Probably a very basic question.
I'm trying to a create a table in mySQL 4.0.15 thus:
create table VACANCIES(
VACREF char(6) NOT NULL PRIMARY KEY,
TITLE varchar(60),
LOC varchar(9),
DESC text,
STARTDATE date,
GROUP varchar(25),
CONSTRAINT fk_grp FOREIGN KEY (GROUP)
From: eifion herbert (IAH-C) [mailto:[EMAIL PROTECTED]
> Hi,
>
> Probably a very basic question.
>
> I'm trying to a create a table in mySQL 4.0.15 thus:
>
> create table VACANCIES(
> VACREF char(6) NOT NULL PRIMARY KEY,
> TITLE varchar(60),
> LOC varchar(9),
> DESC text,
> STARTDATE date,
> GR
Hi,
Probably a very basic question.
I'm trying to a create a table in mySQL 4.0.15 thus:
create table VACANCIES(
VACREF char(6) NOT NULL PRIMARY KEY,
TITLE varchar(60),
LOC varchar(9),
DESC text,
STARTDATE date,
GROUP varchar(25),
CONSTRAINT fk_grp FOREIGN KEY (GROUP) REFERENCES GROUPS(GPNAME),
Thanks a lot, I think I have enough to validate the syntax (sort of).
Ahmad Khashan
Michael Stassen <[EMAIL PROTECTED]> wrote:
Khashan wrote:
> **None of these are "table level" modifiers**
>
> Sorry, I guess I used the wrong terminology. I am aware of the table
> options available. What I me
Khashan wrote:
**None of these are "table level" modifiers**
Sorry, I guess I used the wrong terminology. I am aware of the table
options available. What I meant is “additional definitions” after the
columns have been defined.
Sorry I misunderstood you.
Now, do I understand that you are saying
**None of these are "table level" modifiers**
Sorry, I guess I used the wrong terminology. I am aware of the table options
available. What I meant is additional definitions after the columns have been
defined.
Now, do I understand that you are saying that a user can specify any of :
Khashan wrote:
Thanks for the reply.
It seems like the syntax for create_table/create_definition
should have 2 part-2 modifiers
I think you are misreading the syntax. That is, I think you are confusing
the index-related create_definitions with the table_options.
1- one part-2 'column' modifi
d then again specify 'Primary Key' as part of
the table modifiers?
Ahmad Khashan
Rhino <[EMAIL PROTECTED]> wrote:
- Original Message -
From: "Khashan"
To:
Sent: Thursday, April 01, 2004 1:04 PM
Subject: Create Table Syntax
>
> I am looking at the sy
- Original Message -
From: "Khashan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 01, 2004 1:04 PM
Subject: Create Table Syntax
>
> I am looking at the syntax for creating table( section 6.5.3 of the
manual):
>
> CREATE [TEMPORA
I am looking at the syntax for creating table( section 6.5.3 of the manual):
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
[table_options] [select_statement]
and:
create_definition:
part-1 (<- inserted by me for reference)
col_name type [NOT NULL | NULL]
"suwandy" <[EMAIL PROTECTED]> wrote:
>
> i'm currently learning mysql and interesting to
> constraint, relational and check function.
>
> could anyone give some example please ?
CHECK clause is parsed but it doesn't do anything.
Info about FOREIGN KEY CONSTRAINTS you can find at:
http:
hi..
i'm currently learning mysql and interesting to
constraint, relational and check function.
could anyone give some example please ?
any help is appreciated.
thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EM
At 5:18 PM -0700 8/23/01, Igbar Foosenhopper wrote:
>Is it possible to use current_date (mysql function) to generate a
>default for a column?
No. Defaults must be constants.
http://www.mysql.com/doc/C/R/CREATE_TABLE.html
>
>If so .. what would the syntax look like. I have tried several thing
Is it possible to use current_date (mysql function) to generate a
default for a column?
If so .. what would the syntax look like. I have tried several things
and it doesn't seem to like it.
If not .. how could I generate a default of todays date (of course
dependent on the date of insert)?
Tha
16 matches
Mail list logo