![]() ![]() SELECT t.name AS 'TableName', c. A information with columns emails, mailbox, note1, sent dt/tm, note2 etc. Is there a simple way to go about this, without resorting to external tools or whatnot?īelow is what i used to find all tables containing specific value for a specific column name DECLARE varchar(250) ĭECLARE varchar(250) = '%M圜olumnName%' The only other option I can think of is to take the output from the first query and run a SELECT on each one, which would give me unwieldy output in SQL Server Management Studio, to say the least. WHERE col.name LIKE 'm圜olumn' AND col.value = 'myVal' JOIN sys.columns col ON col.object_id = tab.object_id Something along the lines of this (which I know doesn't work it's for illustration purposes): SELECT (I'll be trying to delete all those rows later, but SELECT first, DELETE later.) The program comes with an elegant and easy-to-use translucent user interface. In the third video of our 'Controlling your Databases with Sequel Pro' series, 'Creating a Table and Columns,' CodeTime instructor Trevor. It is a native Mac application with significant performance and a large feature set. What I'm now looking for is a modification to that - is there a way to get all of the rows in each of those tables where my target column name has a specific value? Basically, I want to be able to rip through every table in the system and select every row where a specific column name has a specific value. SQLPro for MSSQL is a powerful program that enables you to access Microsoft SQL servers including those hosted in Azure. JOIN sys.tables t ON c.object_id = t.object_id This is what I'm using, from that post: SELECT c.name AS 'ColumnName' That part works great, and it returns me over 100 tables. So I've used this post to get all tables that have a specific column. 6) information on identity, check constraint, and default info. (I've seen a couple of other posts about this on StackOverflow - specifically this and this, but they both seem to be Oracle-specific, and I'm using SQL Server.) 2) object name (including schema) 3) object type (table/view) 4) data type (nice format: varchar (6) or numeric (5,2), etc.) 5) null/not null. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |