Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to get command on oracle sql

The things I looking for some help with command on Oracle DB.

Right now I not near that database so I cannot try anything.

I will write down on paper your answers and I will try them and will let you know.

For now some info:

I using OLE connection to database by using c# OLE Connect which command I need to execute to get:

primary key every table:

I already got SQL for primary key but I don't know how to execute it to change the casting things

            "SELECT a.owner, a.TABLE_NAME, b.column_name
            FROM all_constraints a, all_cons_columns b
            WHERE a.constraint_type='P'
            AND a.constraint_name=b.constraint_name
            AND a.TABLE_NAME = 'CASTING'"

Edit: removed the If exist (i will get all tables and foreach table I will add drop table query)

But how it on oracle (for now I will keep it I will let you know tomorrow morning 9-11 hours from now I will update this topic)

How I check if some columns is_identity it mean it auto_increment

and when I found it how to check

           **"IDENT_SEED ,IDENT_INCR ,IDENT_CURRENT"**

Last thing:

how can I get info from every table, info like that :

column_name, data_type, is_nullable, character_maximum_length

Thank you in advance for helping

like image 905
Asaf Shazar Avatar asked Jan 18 '26 02:01

Asaf Shazar


1 Answers

Thanks you guys The project work. The versiob is 11.42 so there no auto incerment And everthing work perfect All column info work Primary keys work

like image 59
Asaf Shazar Avatar answered Jan 19 '26 16:01

Asaf Shazar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!