الانتقال إلى المحتوى

مساعدة : مطلوب عمل query لمعرفة اسم الجدول وبجانبه عدد الصفوف التي بداخله


asd13

Recommended Posts

أخي الكريم

يمكنك باستخدام
DBA_TAB_COL_STATISTICS,DBA_TAB_COLUMNS,DBA_TAB_COLS, DBA_COL_COMMENTS

select column_name,data_type from cols where Table_name='TEST_TABLE'

COLUMN_NAME DATA_TYPE
------------------------------ --------------------
A NUMBER
B VARCHAR2
C CLOB


-------
Select COLUMN_NAME from user_tab_columns where table_name='EMP'

select column_name from all_tab_columns where table_name =upper('tablename');

--------
SELECT t.TypeOwner TypeOwner
FROM metaTable tab, metaType t
WHERE tab.TypeName = t.TypeName"


--------
لذلك

ALL_TABLES - list of all tables in the current database that are accessible to the current user
ALL_TAB_COLUMNS - list of all columns in the database that are accessible to the current user
ALL_ARGUMENTS - lists the arguments of functions and procedures that are accessible to the current user
ALL_ERRORS - lists descriptions of errors on all stored objects (views, procedures, functions, packages, and package bodies) that are accessible to the current user
ALL_OBJECT_SIZE - included for backward compatibility with Oracle version 5
ALL_PROCEDURES - (from Oracle 9 onwards) lists all functions and procedures (along with associated properties) that are accessible to the current user
ALL_SOURCE - describes the text (i.e. PL/SQL) source of the stored objects accessible to the current user


ولعد الصفوف داخل أعمدتها

COLUMN DUMMY NOPRINT
 COMPUTE SUM OF NUM_ROWS ON DUMMY
 BREAK ON DUMMY
 SELECT
    NULL DUMMY,
    T.TABLE_NAME,
    C.COLUMN_NAME,
    T.NUM_ROWS
 FROM
    ALL_TABLES T,
    ALL_TAB_COLUMNS C
 WHERE
    T.TABLE_NAME = C.TABLE_NAME
    AND C.COLUMN_NAME LIKE '%PATTERN%'
 ORDER BY T.TABLE_NAME;




تحياتي لك

رابط هذا التعليق
شارك

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

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

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

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

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