When I have granted privileges to a user for some specific tables: How do I revoke the privileges for this user, just for table1? Answer Google is your friend! http://dev.mysql.com/doc/refman/5.7/en/revoke.html Syntax: To further explain this answer – I’ll teach how to fish (rather than just give you a fish). The MySQL documentation can look confusing at first – the “syntax”
Tag: mysql
Combine two queries from different tables and sort by a common column?
I have this two queries And Is there any simple way to get both results in the same query and sort by fecha column? and would it be possible to add a field to determinate which table is a row from? Answer you can use union: EDIT: for your additional request, to add a column indicating from which table it
INNER/LEFT JOIN two tables and extend result with row [closed]
I have two tables which both have a row by the name “type”. It looks like this: events: ——————————– | id | title | type | ——————————– | 1 | …
Select all from table where the rows has the highest id of all those with the same foreign keys
So I have a posts table with a author_id foreign key and a published status (bool). I want to select all the most recent (highest id) published posts for an author (all those with the same author_id foreign id). Right now I can get the highest for a group of foreign keys But this only returns the highest id for
SQL inner join syntax error
I have this error. I am new to SQL and can’t figure what is wrong with my syntax. I changed my INTERSECT statement to inner join realizing SQL does not accept such syntax. However I continue to get an …
Creating a mySQL sub query to list distinct rows from two queries
I have two queries: and The first query returns around 4000 values, the second query returns around 4100. I’m attempting to create a query that will return the rows which are distinct between the two values, I’m attempting this by using a nested or sub query but I’m struggling with syntax here. Having only worked with very simple queries before.
How to find top 3 topper of each subject in given table
Just want to show 3 topper of each subject Answer You can do this using variables.
MySQL code to convert Excel datetime
Excel’s datetime values look like 42291.60493, which means MySQL sees them as strings and not as dates. Is there a MySQL code that can convert them to MySQL datetime? (i.e. like in MS SQL) Answer I can think of 2 solutions: Convert your dates within excel to a formatted date string that conforms to mysql’s date and time format using
No error message displayed on MYSQL Workbench latest version
I am running the latest version of MYSQL Workbench on a clean ubuntu 14.04 install, using the ubuntu package version. When I run a valid query, it works fine, e.g.: select * from users; At the …
Why Can’t I Connect to My Database Over the Internet
I have an sql database called roottesting and I manage it at the ip 192.168.1.121. I also have a simple java application that connects to it (or rather, is supposed to connect to it) over the Internet with a user named ‘user’ that has a host of ‘%’, which I know will make it usable for any computer that uses