Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Need tables consists of Transaction ID column

What I have tried:

select table_name,column_name from information_schema.columns where column_name like '%Transaction ID%'
Posted
Updated 28-Jun-18 21:21pm
Comments
[no name] 29-Jun-18 3:18am    
And the Problem/question is?

And if I run your code - slightly changed since I don't have any "Transaction ID" columns - I get what I expect:
SQL
select table_name,column_name from information_schema.columns where column_name like '%ID%'

table_name  column_name
CCr         id
Stock       Id
Stock       ItemID
Folder      DefaultPhotoID
Folder      FolderID
Gallery     FolderID
Gallery     PhotoID
Invoices    id
Managers    ID
Managers    ManagerID
ChatEvents  Id
Salesman    SalesID
So my best guess is that the name you are searching for is wrong: "TRansaction ID" may be "Transaction_ID" or "TransactionID"
 
Share this answer
 
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG='DatabaseName' and COLUMN_NAME='Transaction_ID'



Hope this will help you.

Thank you
Amit Kalshetti
amit.kalshetti7@gmail.com
 
Share this answer
 
v3
Comments
CHill60 29-Jun-18 9:44am    
You might want to remove your email address from your post - this is an open forum and unpleasant people have been known to write bots to search for email addresses to spam
amit kalshetti 4-Jul-18 2:32am    
okie will remove email from my post thank you...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900