Tagged Questions
-1
votes
0answers
30 views
information_schema.table_constraints doesn't exist error in MySQL
I'm new to this and Googling didn't help me with this one. I'm trying to check whether a foreign key constraint already exists like this:
$sql = 'SELECT `constraint_name`, `table_name` FROM ...
0
votes
1answer
96 views
mysqldump, preserve update_time and modify_time attributes as listed by show table status from
Does mysqldump preserve the create_time and update_time attributes that are output by show table status from?
If not, is there an option that does this?
From the manual it looks like mysqldump ...
2
votes
2answers
117 views
Does MySQL have information_schema.VIEW_COLUMN_USAGE or an equivalent?
SQL Server has a an information_schema view, 'VIEW_COLUMN_USAGE', which you can use to determine the actual/base tables that the columns in a view reside in.
I'm looking for the equivalent in MySQL - ...
2
votes
2answers
104 views
Does MySQL 5.5 support shared database with separate schema?
I am developing a SaaS based product using MySQL 5.5 as the backend database. I want to keep shared database for all the tenants, but separate a database schema of each tenant. There would be a single ...
3
votes
3answers
210 views
How can I select using the same fields from an undetermined number of tables using MySQL?
I'm dealing with a MySQL database where I have an undetermined amount of identically structured tables that look like this:
foo_reference1
foo_reference2
foo_referencea
foo_referenceb
....
...
1
vote
1answer
931 views
“show create table” output with out “show”?
What
I'd like to be able to get the SQL statement by 'show create table' as something I could do something with along the lines of
insert into mytable (myTextColumn) (show create table blah)
I've ...
1
vote
1answer
185 views
Why are these queries slow in some environments and not others? Can we fix their performance?
The following stored procedures in a MySQL 5.x environment:
DELIMITER //
CREATE PROCEDURE sp_belongs_to (IN schemaName VARCHAR(100), IN tableName VARCHAR(100))
BEGIN
SELECT TABLE_NAME as ...
3
votes
2answers
804 views
What is the point of the TABLE_CATALOG column in INFORMATION_SCHEMA.TABLES?
In MySQL's table INFORMATION_SCHEMA.TABLES, there's a column named 'TABLE_CATALOG'. The documentation is sparse on this column and I'm wondering what the heck is the purpose of this? Any killer-app ...
8
votes
1answer
4k views
How is INFORMATION_SCHEMA implemented in MySQL?
The INFORMATION_SCHEMA is, in theory, a set of views specified in the SQL standard that allow the user to inspect the system's metadata. How is it this implemented in MySQL?
When I connect to a fresh ...
