الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

كيف اضع المفتاح الاساسي في الجدول ؟

Featured Replies

بتاريخ:

السلام عليكم ورحمة الله وبركاته

على ما أخبر في الاكسس ان الكود هذا صحيح

create table key
(typecar varchar2(5),
numbercar char(6),
color varchar2(5))
constraint PK primarykey (numbercar);




لكن في الاوراكل لم يكن صحيح كيف اضع المفتاح الاساسي في الحقل الثاني ؟

ثانيا

بعد عمل الجدول اين يكون الجدول ؟ وكيف اضع القيم فيه ؟

اطيب تحيه لكم

بتاريخ:

السلام عليكم ...

هذا المثال لعمل مفتاح اساسي

CREATE TABLE departments(
department_id NUMBER(4),
department_name VARCHAR2(30)
CONSTRAINT dept_name_nn NOT NULL,
manager_id NUMBER(6),
location_id NUMBER(4),
CONSTRAINT dept_id_pk PRIMARY KEY(department_id));



اما بالنسبه لاادخال بينات على جدول معين فهذي الصيغه العامه :

INSERT INTO table [(column [, column...])]
VALUES (value [, value...]);



وهذا مثال عليها :

INSERT INTO departments(department_id, department_name,
manager_id, location_id)
VALUES (70, 'Public Relations', 100, 1700);



وبالتوفيق :(

بتاريخ:

you can do that by writing this code after creating your table.
suppose that your table name is emp and you want the empno column to be the primary key. you code must be:

alter table emp
add constraints pk1 primary key (empno);



please try it and tell me if it worked propably.

  • بعد 6 شهور...
بتاريخ:

ولوضع المفتاح الاساسى على حقلين ، بعد كتابة الحقول فى جملة الانشاء نضيف القيد
create table orders (order_id number(7 ), product_id number(7), cust_id number(5) constraint ord_prod_pk primary key (order_id, product_id);

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.