William14 Posted December 31, 2013 Share Posted December 31, 2013 Hi, How to search for a table name and column name by just knowing the value of a column in database ? Could you please share the script or query to achive this ? Thanks!! Regards, Williams Link to comment Share on other sites More sharing options...
niche Posted January 1, 2014 Share Posted January 1, 2014 SELECT * FROM Customers WHERE Country='Mexico'; This is right out of the tutorial: http://www.w3schools.com/sql/sql_where.asp Happy New Year! Link to comment Share on other sites More sharing options...
thescientist Posted January 4, 2014 Share Posted January 4, 2014 It sounds like he has Mexico, and want's to know how to use that information to get Country and Customers, to use your example. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 6, 2014 Share Posted January 6, 2014 With MySQL, for example, you can use the information_schema database. That will contain a list of all of the tables in each database and their properties, and a list of all of the columns in each table and their properties. You can generate that list of tables and columns and then search through them using select queries. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now