View previous topic :: View next topic
|
Author |
Message |
manjunathkv
New User
Joined: 23 May 2006 Posts: 9
|
|
|
|
can we use select * in cobol program?
Thanks in advance |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Yes.
But it is not advisable since we would not need all columns. It creates an overhead. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Manju,
Your Subject and the contents in the post are not the same.
Quote: |
Can we use select * in the embeded sql |
Quote: |
can we use select * in cobol program?
|
Anyways, it is not advisable to use as you may face issues when the table structure gets changed . |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Manjunath,
From the manual.
Quote: |
SELECT * is recommended mostly for use with dynamic SQL and view definitions. You can use SELECT * in static SQL, but this is not recommended; if you add a column to the table to which SELECT * refers, the program might reference columns for which you have not defined receiving host variables |
|
|
Back to top |
|
|
|