Query
What is the meaning of "Select Ac1_Code, Ac1_Name, ' ' as Publisher,0 as Ac1_Status from accounts1 order by ac1_name "
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 27, 2012, 7:05 AM
- You are trying to retrieve the result from the account1 table.
- You have columns like Ac1_Code, Ac1_Name from the table. You want to retrieve the columns
- You are trying to retrieve ''(single space empty) in the publisher column in result table.
- You are trying to create the Act1_Staus column and you want to make 0 is default result in that column.
- You are trying to order the result by ac1_name in the ascending order.
Now result will be,
Ac1_Code Ac1_Name Publisher Ac1_Status
00001 Ajay 0
00002 Babu 0
00003 Harish 0
00004 Ramesh 0
00005 Senthil 0
Hope this will help you to understand this query.a
Prasant JinagaPosted Mar 27, 2012, 6:27 AM
It means fetching Ac1_Code , Ac1_Name , ' ' as Publisher (which is blank values with alias means column name as Publisher), 0 value with alias or column name Ac1_Status from accounts1 table then ordered by ac1_name
Hope it helps!!!
Thanks,
Prasant
VulpesPosted Mar 27, 2012, 6:23 AM