Questions tagged [system-tables]
59 questions
1710
votes
36 answers
Find all tables containing column with specified name - MS SQL Server
Is it possible to query for table names which contain columns being
LIKE '%myName%'
?

gruber
- 28,739
- 35
- 124
- 216
335
votes
15 answers
How to check if a Constraint exists in Sql server?
I have this sql:
ALTER TABLE dbo.ChannelPlayerSkins
DROP CONSTRAINT FK_ChannelPlayerSkins_Channels
but apparently, on some other databases we use, the constraint has a different name. How do I check if there's a constraint with the name…

Lieven Cardoen
- 25,140
- 52
- 153
- 244
7
votes
2 answers
Difference between SYS.ALL_TAB_COLUMNS and SYS.ALL_TAB_COLS in Oracle 12c
What is the difference between the ALL_TAB_COLUMNS and ALL_TAB_COLS system tables in Oracle 12c? In my DB, the ALL_TAB_COLUMNS has slightly fewer rows than ALL_TAB_COLS.

amphibient
- 29,770
- 54
- 146
- 240
6
votes
2 answers
PostgreSQL: find information about user defined types
Where is information about user-defined types stored?
Are there some tables which contain information about the fields of a user-defined composite type, their names, etc.?

Antonio F.
- 411
- 2
- 9
- 16
6
votes
1 answer
What's the difference between name and tbl_name in sqlite_master?
What's the difference between name and tbl_name in sqlite_master?

Jonathan Freitas
- 61
- 3
3
votes
2 answers
What is database objects are needed for a Database Design in SQL Server 2008 R2?
I have a Visual Studio project where I have scripted out my dbo.sysdiagrams. When I deploy my project the whole database is dropped and recreated from the scripts I have. One of my post deploy scripts creates dbo.sysdiagrams and fills in the…

Vaccano
- 78,325
- 149
- 468
- 850
3
votes
1 answer
How can I rename a user-created SYSUSERS table?
Someone renamed our Users table to SYSUsers, which is a key sql table name. Is there a way to rename this table?
I've tried right-clicking the table and going to rename, and running sp_RENAME on it, but both are trying to rename the system sysusers…

Rachel
- 130,264
- 66
- 304
- 490
3
votes
1 answer
How to extract Stored Procedure body in Teradata
I'm trying to extract Stored procedure DDL by querying system tables.
If I run the following query
select * from dbc.tvm where TableKind = 'P'
both fields RequestText and CreateText contain NULL.
Is there any way to query Stored Procedure body apart…

MaterialGirl
- 363
- 2
- 10
- 22
2
votes
0 answers
The newly created schema and tables are not listed under "Information_schema.columns" table in PostgreSQL
We have newly created few tables and schema(with tables under it). We used to fetch the table+ columns info by querying Information_schema.columns table. But the newly created tables and schema are not showing up while querying…

Vicky
- 115
- 1
- 10
2
votes
1 answer
Mapping to different linked servers per database
I have an MSSQL Server 2008 database "DBLive" that link to three different external servers [ExtServer1, ExtServer2, ExtServer3], all defined in sys.servers. There are several stored procedures that refer to stored procs or tables on the external…

Lars Fosdal
- 1,144
- 8
- 14
2
votes
1 answer
Programmatically generate DDL statement for User Defined Data Type (UDDT)
I'm trying to add faking synonyms pointing to remote objects support(PR) for tSQLt.
To make it possible to mock/fake tables that have user defined system types in the table definitions, I need to generate the User Defined Data Type (UDDT) DDL…

Dmitrij Kultasev
- 5,447
- 5
- 44
- 88
2
votes
1 answer
Which permission need to grant to access sys.dba_systems
I am working on the application which works on Oracle. For some kind of logic I need to get the list of tables from the given db user with the specified schema. In my case, I have a user which have granted access of the given schema. So when my code…

Tej Kiran
- 2,218
- 5
- 21
- 42
2
votes
3 answers
Unable to update sys.columns - any other approach?
I just found out, that since I created my DB on a different server that had a different collation, then immigrated to a new server with new collation, now I keep on having trouble, and I decided to change all the values of the old collation.
So I…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
2
votes
3 answers
Ms Sql sys tables equivelant in Oracle
I could not find all tables equivalent in oracle.
Such as;
sys.index_columns
sys.columns
sys.foreign_key_columns
Is there any list to find out these table names? We have several queries in mssql and they are needed to be convert for oracle.

unbalanced
- 1,192
- 5
- 19
- 44
2
votes
3 answers
Oracle db view/system table to check if given part of a package is a Procedure or a Function
I am using the Oracle system tables to get some metadata about the Packages in our database.
Here is one of my queries:
select AP.PROCEDURE_NAME
from ALL_PROCEDURES ap
where ap.object_name = :object_name
and ap.owner=:owner
and…

minty
- 22,235
- 40
- 89
- 106