开发者

How to identify the column name of a data table

开发者 https://www.devze.com 2023-02-22 03:33 出处:网络
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

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

精彩评论

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