بتاريخ: 30 أبريل 200916 سنة comment_155388 create table departments(dept_id number(4) constraint d_id praimary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3) constraint d_locid foreign key references locations(loc_id)); create table locations(loc_id number(3) constraint location_id primary key, adrres varchar2(30) constraint add_nn not null); تقديم بلاغ
بتاريخ: 30 أبريل 200916 سنة comment_155391 create table departments(dept_id number(4) constraint d_id primary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3)constraint d_locid REFERENCES locations(loc_id) ) راجع الماتريل فقط ستجد هنا بعض الاخطاء البسيطةالخطأ في الجدول الاول والثاني صحيح تم تعديل 30 أبريل 200916 سنة بواسطة mustafagamiel تقديم بلاغ
بتاريخ: 3 مايو 200916 سنة comment_155617 create table departments(dept_id number(4) constraint d_id praimary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3) constraint d_locid foreign key references locations(loc_id)); create table locations(loc_id number(3) constraint location_id primary key, adrres varchar2(30) constraint add_nn not null); اخي العزيز انتا عامل في الجدول الاول References للجدول لسى مش موجود وهو locationsثانيا خذها نصيحة من اخوك دائما انشاء الجداول ثم اكتب القيود احسن واوضح يعني هيك .create table locations ( loc_id number(3), adrres varchar2(30) not null); alter table locations add constraint locations_pk primary key(loc_id ) ); وبعدين الجدول الثاني create table departments( dept_id number(4), dept_name varchar2(30) not null, manager_id number(4) , loc_id number(3) ); alter table departments add constraint departments_pk primary key(dept_id ); alter table departments add constraint departments_Fk foriegn key(loc_id ) refernces locations (loc_id ); إن شاء الله اكون وصلت الفكرة تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.