开发者

How to identify the column name of a data table

I have got a 开发者_Python百科datatable with records from two different database tables. Each of the database tables have a column with the same name(eg: ID). The datatable generated will display the field ID of the two tables as ID and ID1. I need to sort the datatable with the ID of the second table. How can I identify which column of the datatable is the ID of the second table.


You can specify the name of the columns in the SQL query

SELECT 
  FT.ID FIRSTTABLE_ID,
  ST.ID SECONDTABLE_ID
FROM FIRSTTABLE FT, SECONDTABLE ST
WHERE FT.ID = ST.FS_ID
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜