This question already has answers here:
displaying Oracle table's column names
(2 answers)
Closed 8 years ago.
Is there a procedure I can run to search all tables to see to search a particular column? I need to update a particular string present in that column in all tables whereever applicable. There are too many tables to open each one and do a find on the value(s) I'm looking for.
This should help you find the tables which contain your columns:
SELECT TABLE_NAME
FROM USER_TAB_COLUMNS
WHERE COLUMN_NAME='your_column_name';
After that you can execute updates for each table that you have.
I didn't understand your question completely, so I hope this helps you ;)
Related
This question already has an answer here:
Creating a table from a query using a different tablespace (Oracle SQL)
(1 answer)
Closed 5 years ago.
I tried to simply create a table with the structure of another table to sync them contents later.
When is use "CREATE as SELECT", it just returns the error
ORA-00933 "SQL command not properly ended"
As mentioned in the link, the syntax should be OK.
https://www.techonthenet.com/oracle/tables/create_table2.php
Both tables should be stored in the same user scheme.
The only difference is the added user scheme and tablespace.
CREATE TABLE "MYUSER.TABLE_B"
as (SELECT * FROM "MYUSER.TABLE_A")
TABLESPACE "SANDBOX" ;
I don't have Oracle database with me now, but I am sure, you can use like this-
CREATE TABLE "MYUSER.TABLE_B"
TABLESPACE "SANDBOX"
AS
SELECT *
FROM "MYUSER.TABLE_A";
This question already has answers here:
Automated Oracle Schema Migration Tool [closed]
(5 answers)
Closed 7 years ago.
Is it possible in Oracle to generate a bunch of ALTER TABLE statements based on existing table in schema plus CREATE TABLE statement with newer definition of that table?
Let's say I have a schema with some previous version of an application. I have an installation script for newest version of the application. The script creates all tables and sequences from scratch performing CREATE TABLE (and probably CREATE SEQUENCE) statements.
I'd like to update the schema to the newest version of the application without loosing any data (e.g. without performing DROP TABLE).
Is it possible with using of standard Oracle 11gR2 or third party components?
You can try CORT : www.cort.tech
https://github.com/cort-master/cort
It's free
You can create a procedure in PLSQL to:
create new table when it not exists in new DB
alter table when it exists, feeding it with ALL_TAB_COLUMNS
This question already has an answer here:
Oracle query that will list of the database objects referenced by a view
(1 answer)
Closed 8 years ago.
Problem:
when I look at a table, or view or mv, I wonder where this table is being used within the database itself. it has the following possibilities:
update or manipulated through a package
update through a procedure
join or referenced with other tables, views or mvs
called by another database through a DB link
I Java, especially in IDEA like eclipse or netbeans, ctl+shift+g would give you all the
reference on a object.
how do we achieve this is Oracle.
You may try dba_dependencies (or all_dependecies depending on your privileges) for table references, or search the text field in dba_source for package details.
This question already has answers here:
How to do INSERT into a table records extracted from another table
(9 answers)
Closed 9 years ago.
My problem is, i have two table namely enq_tab and feed_back_tab. i need to insert some columns from enq_tab into feed_back_tab and some columns are from a webpage ie, a jsp...
ex: enq_tab: enq_id,name,email,mobile,address,enq_date are columns;
feed_back_tab:enq_id,name,email,mobile,address,enq_date,feed_back,comments,suggestions are columns
here i will get the feed_back,comments, suggestions from the JSP , and remaining columns from the enq_tab based on enq_id, which already present in database.
anybody help me with some suggestions..
Thank in advance..
I think you can do this way.
insert into table1(COL1,COL2,COL3,COL4)
select col1,col2,jspvaribalevalue1,jspvariblevalue2 from table2
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
SELECT INTO using Oracle
I have one table in my oracle database. I want to create one table with another name, but containing same data. How to achieve this ?
Use this query to create the new table with the values from existing table
CREATE TABLE New_Table_name AS SELECT * FROM Existing_table_Name;
Now you can get all the values from existing table into newly created table.