Alter Table Shell Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Alter Table Shell Script
# 1  
Old 10-04-2006
Alter Table Shell Script

I want to add some columns to a existing tables through a shell script.
Please help.
# 2  
Old 10-04-2006
Code:
echo "
ALTER TABLE MYTABLE  <your changes go here................>;
EXIT
" | sqlplus -s username/password@dbname

# 3  
Old 10-06-2006
Alter Table Shell Script

if the database is DB2 ,then will it work

connect to DB2;

Alter table my_table( my changes .......)
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Help with pivoting table shell script

input file txt file 2000 1 name 2000 2 addr 2000 3 phone 2000 4 email 1000 1 name 1000 2 addr 1000 3 phone 1000 4 email 3000 1 name 3000 2 addr 3000 ... (4 Replies)
Discussion started by: senmatrix
4 Replies

2. UNIX and Linux Applications

SQL - how to alter info of a cell in table

Hello, I am newbie on mysql and trying to edit my database from terminal under linux. What I need to do is to change the information written in a cell in table. Let me explain what I tried: $ mysql -u mysqluser -p $ show databases; $ USE catalogue; $ show tables ; $ select * from... (2 Replies)
Discussion started by: baris35
2 Replies

3. Shell Programming and Scripting

Shell Script Table

Hi, i need a bit help. I must write a script with shell- and sed-commands, which reads a table from stdin and writes a html-table on stdout (so i can open it with a web browser). The number of columns must be a parameter for the script, so i can start it for example with: "./htmltab.sh 3... (3 Replies)
Discussion started by: scruffytramp
3 Replies

4. Shell Programming and Scripting

Create DB table through shell script

Hi, Can anyone tell me that, How to create table in Oracle database through shell script(ksh). Table contains 3 fields, 1] Emp ID, String, primary key 2] Name, String 3] B Date, date. Thanks in advance. (6 Replies)
Discussion started by: Poonamol
6 Replies

5. Homework & Coursework Questions

Help with bash shell to alter text file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: My first question pertains to the adding a book section, I'm unsure which command or conditional statement I... (0 Replies)
Discussion started by: Vitrophyre
0 Replies

6. Shell Programming and Scripting

Truncating table from a shell script

I am trying to truncate a table using below script. When I ran the script it runs fine but table was not truncated and the spool is empty. I am not sure what is wrong with pl/sql block. #!/bin/ksh # ---------------------------------------------------------------------- # # Created by: XXXX... (2 Replies)
Discussion started by: gunaah
2 Replies

7. Shell Programming and Scripting

shell script to alter grub menu.lst

Hi folks, I have a dual-boot Ubuntu/Windows machine and I wanted to create a script to change the menu.lst file so it will change the default boot partition (this is so I can reload the machine remotely and allow it to boot to the Windows partition). Today I have to sudo cp a template file I... (1 Reply)
Discussion started by: ppucci
1 Replies

8. Shell Programming and Scripting

Reading a table in a shell script

Dear all: I want to write a script capable of reading specific rows and collumns of a table, into a variable. Just imagine i have a file named table.dat which contains: GENERAL INFORMATION Col 1 Col2 Col3 1 1 2 2 3 3 4 4 What i want to do... (13 Replies)
Discussion started by: luiscarvalheiro
13 Replies
Login or Register to Ask a Question