422 solutions found in database
Page 4 of 22votes
This has been asked on this site before but I couldn't find a sufficient answer. If I'm doing a query like: Select Seller from Table where Locati...
votes
I am storing the last login time in MySQL in, `datetime`-type filed. When users logs in, I want to get the difference between the last login time and the curren...
votes
I often see people are using Delimiters. I tried myself to find out what are delimiters and what is their purpose. After 20 minutes of googling, I was not able...
votes
I was wondering if there is a way to do this purely in sql: q1 = SELECT campaign_id, from_number, received_msg, date_received FROM `received_t...
votes
Here is what I want to do: current table: +----+-------------+ | id | data | +----+-------------+ | 1 | max...
votes
The 'id' field of my table auto increases when I insert a row. I want to insert a row and then get that ID. I would do it just as I said it, but is t...
votes
I have numbers saved as `VARCHAR` to a MySQL database. I can not make them `INT` due to some other depending circumstances. It is taking them as character n...
votes
The [MySQL documentation][1] says that it should be `\'`. However, both SciTE and MySQL shows that `''` works. I saw that and it works. What shou...
votes
I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints...
votes
I have a database called `nitm`. I haven't created any tables there. But I have a SQL file which contains all the necessary data for the database. The file...
votes
Can I run a select statement and get the row number if the items are sorted? I have a table like this: mysql> describe orders; +-------------+...
votes
I'm working on code written by a previous developer and in a query it says, WHERE p.name <=> NULL What does `<=>` mean in this query?...
votes
In short: Is there any way to sort the values in a GROUP_CONCAT statement? Query: GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " &...
votes
I wanted to run a simple query to throw up all the rows of `Table1` where a principal column value is not present in a column in another table (`Table2`). I...
votes
I just ran a simple MySQL CREATE TABLE statement that produced the line >"Query OK, 0 rows affected, 1 warning (0.07 sec)." It didn't a...
votes
How to restore one of my MySQL databases from `.myd`, `.myi`, `.frm` files?
votes
I created user `user@'%'` with `password 'password`. But I can not connect with: mysql_connect('localhost:3306', 'user', '...
votes
If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?
votes
How do I store binary data in [MySQL][1]? [1]: http://en.wikipedia.org/wiki/MySQL
votes
I want to begin writing queries in MySQL. `show grants` shows: ```lang-none +--------------------------------------+ | Grants for @localhost...