Thursday, January 12, 2017

sql get all table names with primary key columns

If you want to get all table name with table primary key coloumn you can use the sql query.

 SELECT AS IndexName, OBJECT_NAME(ic.OBJECT_ID) AS TableName,   
     COL_NAME(ic.OBJECT_ID,ic.column_id) AS ColumnName  
 FROM sys.indexes AS i  
 INNER JOIN sys.index_columns AS ic  
 AND i.index_id = ic.index_id  
 WHERE i.is_primary_key = 1  

vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link.