Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to execute a sql script file in toad

Alyssa T.Jul 22 2011 — edited Jul 22 2011
Hi friends

I have a sql script file (sample.sql) file in which it has various sql command like this
CREATE TABLE XXX
  AS (SELECT * FROM XYZ where 1=2);

commit ;

ALTER TABLE XXX ADD (
  CONSTRAINT FK_xxx 
 FOREIGN KEY (id) 
 REFERENCES  XYZ (id));

commit;

ALTER TABLE  XXX
ADD Column_name  datatype

commit;
The task to create a table structure ,add constraint , add new column to the table ... All this is one script file sample.sql how can i execute and check in toad please suggest me

Thanks
AT

Edited by: AT on Jul 22, 2011 8:31 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2011
Added on Jul 22 2011
3 comments
46,606 views