MySQL---3/29

Intergrity Constrait (完整性约束)

 Set table key‘s primary key

  mysql>create table student(

          >id int primary key,

          >name varchar(40),

          >sex boolean,

          >);

  Multiple-field primary key---consists of more than one property

    mysql>create table student2(

            >id int,

            >course_id int,

            >score float,

            >primary key(id,course_id)

            >);

           

   

          

posted @ 2013-03-29 15:00  瑾 梦  Views(97)  Comments(0)    收藏  举报