422 solutions found in database
Page 5 of 22votes
I have an already existing table with a field that should be unique but is not. I only know this because an entry was made into the table that had the same valu...
votes
When the SQL query below is executed: UPDATE shop_category SET name = 'Secolul XVI - XVIII' AND name_eng = '16th to 18th cent...
votes
I have a file that can contain from 3 to 4 columns of numerical values which are separated by comma. Empty fields are defined with the exception when they are a...
votes
When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records: ###M...
votes
I've installed MySQL server on a remote Ubuntu machine. The `root` user is defined in the `mysql.user` table this way: mysql> SELECT host, user, pass...
votes
We have a database that has a bunch of records with some bad data in one column, in which an embedded editor escaped some stuff that shouldn't have been esc...
votes
insert into table select * from table where primarykey=1 I just want to copy one row to insert into the same table (i.e., I want to duplicate an existing...
votes
I am working on designing a large database. In my application I will have many rows for example I currently have one table with 4 million records. Most of my qu...
votes
In MySQL how do I define a custom sorting order. To try to explain what I want consider this table: ID Language Text 0 ENU a 0 JPN b...
votes
Our previous programmer set the wrong collation in a table (Mysql). He set it up with Latin collation, when it should be UTF8, and now I have issues. Every reco...
votes
Is it possible to somehow get structure of MySQL database, or just some table with simple query? Or is there another way, how can I do it?
votes
What is the best SQL data type for currency values? I'm using MySQL but would prefer a database independent type.
votes
Well here's my problem I have three tables; regions, countries, states. Countries can be inside of regions, states can be inside of regions. Regions are t...
votes
Is there any way to get SQLAlchemy to do a bulk insert rather than inserting each individual object. i.e., doing: INSERT INTO `foo` (`bar`) VALUES (1)...
votes
I'm trying to delete orphan entries in a mysql table. I have 2 tables like this: Table `files`: id | .... ----|------ 1 | .... 2 | .... 7...
votes
I'm trying to figure out how to locate all occurrences of a url in a database. I want to search all tables and all fields. But I have no idea where to start...
votes
I’m trying to modify a table to make its primary key column `AUTO_INCREMENT` after the fact. I have tried the following SQL, but got a syntax error notificatio...
votes
Is it possible to set a user variable based on the result of a query in MySQL? What I want to achieve is something like this (we can assume that both `USER`...
votes
# Background # I'm a first year CS student and I work part time for my dad's small business. I don't have any experience in real world applicatio...
votes
I execute an INSERT INTO statement cursor.execute("INSERT INTO mytable(height) VALUES(%s)",(height)) and I want to get the primary key. M...