List:General Discussion« Previous MessageNext Message »
From:Prabhat Kumar Date:June 25 2010 10:36am
Subject:Re: Table creation fail
View as plain text  
Yes, but few exceptions;

Column level constraints are applicable to that column only, whereas table
level constraints are used to define composite keys like primary key for the
combination of two or more columns in a table.

column level constraints contain all types of constraints (like, not
null,primary key,foreign key,unique).but table level except not null
constraint its supports all  constraints.

--Prabhat

On Fri, Jun 25, 2010 at 2:45 PM, Johan De Meersman <vegivamp@stripped>wrote:

> A Primary key constraint can be defined at various levels:
>>
>>    * Primary key constraint defined at column level
>>                      Syntax: <Column Name> <datatype>(<size>)
> Primary Key
>>    * Primary key constraint defined at table level
>>                     Syntax: Primary key (<Column Name>, <Column
> Name>)
>>
>
>
> Aren't those two alternate syntaxes for the exact same thing ?
>
> --
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel
>



-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile     : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat

Thread
Table creation failDavid Stoltz23 Jun
  • Re: Table creation failKrishna Chandra Prajapati23 Jun
    • RE: Table creation failDavid Stoltz23 Jun
      • Re: Table creation failJoerg Bruehe24 Jun
        • Re: Table creation failPrabhat Kumar25 Jun
          • Re: Table creation failJohan De Meersman25 Jun
            • Re: Table creation failPrabhat Kumar25 Jun
  • Re: Table creation failmos23 Jun