unix - Practical difference between .pls and .sql file in oracle -


what practical difference between .pls , .sql file in oracle. restrictions on different types of statements in both?

i given project in unix(korn script) uses both .sql , .pls files in different places. trying figure out should used where.

file suffixes large extent matter of convention. can use them provide useful metadata other developers.

so .pls indicates (we hope) file pl/sql script, creating pl/sql package or stored procedure. in other shops might see .pks , .pkb indicate package spec script , package body script respectively. file .tab or .tbl extension indicates ddl create table. because convention requires discipline (or code reviews) make sure remain consistent.

the 1 difference .sql. although convention represents sql (a query, or perhaps dml or ddl) has special property in sql*plus. if have script called whatever.sql can call in sql*plus...

sql>  @whatever 

... whereas if script has other extension must include extension in call...

sql>  @whatever.pls 

other ides or others clients (e.g. build scripts) may use file extensions filtering mechanisms or applying syntax highlighting, rules should controlled preferences.

" restrictions on different types of statements in both?"

to sum up, there no restrictions. places have worked used nothing .sql files, others had complicated menagerie of scripts: .tbl, .idx, .vw, etc. sociopaths can use .txt files: database won't care. provided it's valid oracle syntax code run.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -