Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select statement for primary keys

Former Member
0 Likes
1,709

Hi

What is the syntax to select a statement from a table with only primary keys. there are 4 primary keys i have to select all the 4 primary keys is there any syntax difference???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,324
data: itab like ztable.

select * from ztable into corresponding fields of table itab.

can i use like this???

Can i declare my internal table like this where i have to get all the fields in that particular table

Regards

Nanda

4 REPLIES 4
Read only

Former Member
0 Likes
1,325
data: itab like ztable.

select * from ztable into corresponding fields of table itab.

can i use like this???

Can i declare my internal table like this where i have to get all the fields in that particular table

Regards

Nanda

Read only

0 Likes
1,324

Hi gurus

just me any suggestion

Read only

0 Likes
1,324

Hi,

u can do like this.........

select <field1 name> 
       <field2 name>
       <fields name>
       <field4 name>
from   <ztable> 
into   corresponding fields of table itab
where  cond.....

.

Cheers,

jose.

Read only

Former Member
0 Likes
1,324

Hi,

do u want those primary keys in the internal table or else will u have a where condition based on those all the primary key fields

if u use all the four primary keys u can write like this remember one thing first u write the field just like in the table created order it is not mandatory to do like that but it increases the performance of the so query

select single * from ztable into table t_tab where (mention all the four primary keys here ) it increases the performance we are using this single because u r giving all the primary keys in the select query so obvously one record will be there so it increases the query performance..

if wont give those primary keys then write like this select * from ztable into table t_tab.

as normal as ordinary

i hope u got cleared

plzz reward if it is helpful..

plzz dont forget to reward...