Table Manipulation

Table Manipulation

Post by John (Yo » Fri, 26 Feb 1999 04:00:00



Hi,

I am very much an Oracle beginner, but I have inherited a web program that uses a database so I'm looking for a little help with:

1) What commands will add/delete tables?
2) How can I list existing table field names and details?

Unfortunately, I have no direct access to the database, only through Javascript,
and no documentation :-(

Is this kind of info available on a web site anywhere?

TIA for your help,
On-On /Yogi

---

East Grinstead Hash House Harriers | On On in Sussex and Kent (UK)
Brighton GO Club                   | British GO Association (2D)
Brighton Morris Men                | Melodeon, Guitar, Songs
Phone: (Home) 01444 244581         | (Work) 01444 234812
"I think, therefore I can"   -   Thomas the Tank Engine

 
 
 

Table Manipulation

Post by Robert H. Thompso » Fri, 26 Feb 1999 04:00:00



> Hi,

> I am very much an Oracle beginner, but I have inherited a web program that uses a database so I'm looking for a little help with:

> 1) What commands will add/delete tables?

Use create table - to create a table i.e

    create table temp (
       field1          varchar2(10),
       field2          number,
       field3          long
    );

    commit; - this will commit (create the table in the database)

Use drop table - to delete or remove a table i.e

    drop table temp;

    commit;

Use truncate table - to empty a table and retain the table in the
                     database

    truncate table temp;

    commit;

Quote:> 2) How can I list existing table field names and details?

Use desc to show the table structure.

desc temp;

It would be benefical to you to purchase an Oracle reference book. Any
of the DBA books from Osbourne or O'Reilly will really help you out.
The Complete Oracle Reference is a good place to start along with a good
SQL book. Joe Cielko SQL for Smarties is very good.

Quote:> Unfortunately, I have no direct access to the database, only through   > Javascript, and no documentation :-(

There are a lot of views that you could use. The Oracle Complete
reference documents a lot of them. You don't say what the specific need
is but this book will help you out. If you are going to have DBA type
duties you may need to have someone set up an account in the database
for you with DBA priveleges or some type of developers account with the
priveleges that you need.

Quote:> Is this kind of info available on a web site anywhere?

Oracle Meta Link http://support.oracle.com/MetaLink/
Oracle Technology Network http://technet.oracle.com/
Oracle Assist http://www.oracleassist.com/
OraPerl http://www.omix.com/~hphan/tutorial/
Oracle Fans http://www.oraclefans.com/

Hope this helps

Rob Thompson
DBA
Ford Motor Company

> TIA for your help,
> On-On /Yogi

> ---

> East Grinstead Hash House Harriers | On On in Sussex and Kent (UK)
> Brighton GO Club                   | British GO Association (2D)
> Brighton Morris Men                | Melodeon, Guitar, Songs
> Phone: (Home) 01444 244581         | (Work) 01444 234812
> "I think, therefore I can"   -   Thomas the Tank Engine


 
 
 

Table Manipulation

Post by Stephen Harr » Fri, 26 Feb 1999 04:00:00



:     create table temp (

:     commit; - this will commit (create the table in the database)

Not needed.  "Create table" is a DDL (Data Definition Language) command
and these are automatically committed.

"Drop table" and "truncate" are also DDL commands, and so don't need a
commit.

--

rgds
Stephen

 
 
 

1. Help with Table Manipulation

I have a fairly simple task for drawing up a graph I need to have my
query
display 3 columns ReportDate, PDL, PDLAverage.
Here is the table data.
ReportDate                            PDL
--------------------------- -----------
2001-01-01 00:00:00.000     308
2001-01-02 00:00:00.000     350
2001-01-03 00:00:00.000     214
2001-01-04 00:00:00.000     259
2001-01-05 00:00:00.000     272

Now assuming the average over those 5 days is 311 here is what my output
should look like
Here's what I wold like it to look like
ReportDate                            PDL        Average
--------------------------- ----------- -----------
2001-01-01 00:00:00.000     308         311
2001-01-02 00:00:00.000     250         311
2001-01-03 00:00:00.000     214         311
2001-01-04 00:00:00.000     259         311
2001-01-05 00:00:00.000     272         311

Thanks in advance.
Pete J.

2. Running DTS packages from VB

3. help on table manipulation

4. server group?

5. SQL 6.5 table manipulation

6. Identity columns

7. Table Manipulation

8. TABLE manipulation

9. Paradox4.5 Table manipulation

10. String table manipulation package

11. *** PARADOX question on table manipulation

12. Needed help on FILE --> PL/SQL table Manipulation