Role of "/" and ";" in SQL file [message #290874] |
Tue, 01 January 2008 22:51 |
hidnana
Messages: 87 Registered: November 2007 Location: chennai
|
Member |
|
|
Is there any difference between having "/" after every SQL statement in an SQL file and separating statements with a ";" having the "/" at the end of the SQL file.
Which is the correct method and convention to seperate the the statements ?
INSERT INTO TPD_TL_W_VE_UNIFCN_STATUS_RSN ( VE_UNIFCN_STATUS_RSN_ID,
VE_UNIFCN_STATUS_RSN_DESC ) VALUES (
13, 'GENERAL')
/
INSERT INTO TPD_TL_W_VE_UNIFCN_STATUS_RSN ( VE_UNIFCN_STATUS_RSN_ID,
VE_UNIFCN_STATUS_RSN_DESC ) VALUES (
14, 'PANL')
/
COMMIT
/
B.
INSERT INTO TPD_TL_W_VE_UNIFCN_STATUS_RSN ( VE_UNIFCN_STATUS_RSN_ID,
VE_UNIFCN_STATUS_RSN_DESC ) VALUES (
13, 'GENERAL');
INSERT INTO TPD_TL_W_VE_UNIFCN_STATUS_RSN ( VE_UNIFCN_STATUS_RSN_ID,
VE_UNIFCN_STATUS_RSN_DESC ) VALUES (
14, 'PANL');
COMMIT;
/
|
|
|
|
Re: Role of "/" and ";" in SQL file [message #290882 is a reply to message #290874] |
Wed, 02 January 2008 00:31 |
mshrkshl
Messages: 247 Registered: September 2006 Location: New Delhi
|
Senior Member |
|
|
At the SQL prompt, you can begin typing any SQL command. Upon hitting return (i.e., enter key) the SQL prompt will change to line number prompts. When you are finished typing a command, type / or RUN to execute the SQL command. Also, a semicolon at the end of the SQL command will execute the command immediately after hitting return. In addition to SQL commands, /, and RUN, other commands can be issued at the SQL prompt (a semicolon does not have to follow the nonSQL commands).
|
|
|
|
|
Re: Role of "/" and ";" in SQL file [message #290928 is a reply to message #290892] |
Wed, 02 January 2008 03:38 |
hidnana
Messages: 87 Registered: November 2007 Location: chennai
|
Member |
|
|
I meant the difference in having separators as "/" and ";" in the sql file, while executing the sql file from the OS using @ command. Which is better method ? Separating the statements
by
a) /
OR
b) ; with / at the end ?
|
|
|
|
|