Questions tagged as 'mysql'

3
answers

How to rename all tables in a MySQL database

I have a MySQL database with several tables and I'm migrating to another database.    I have a Client and must be a client PE       I have Product and must be Product_PE How can I accomplish this without however pausing to rename each of...
asked by 26.03.2015 / 04:52
4
answers

What is MySQL's CREATE VIEW command for?

I would like to know what is the CREATE VIEW command for MySQL?     
asked by 12.03.2014 / 20:00
3
answers

How to create multiple entries in an index based on columns on the same row?

I've never found a good way to index multiple columns of a row as an index entry or to simulate this feature in MySQL. The problem arises when you have fields working as tags or a similar concept. Ex:. columns with names tag1 , tag...
asked by 30.01.2014 / 05:03
2
answers

SQL code optimization

How can I optimize the following code so I do not use 3 SELECTs and do not match the query to just 3 status ( SELECT * FROM historico WHERE his_status = 'FRACASSO' ORDER BY his_data DESC LIMIT 50 ) UNION ALL (...
asked by 11.11.2017 / 15:58
2
answers

What is the difference between where and having?

Doing some testing on a database in MySQL, I realized that: SELECT * From client WHERE uuid = '1kvsg4oracxq' returns the same result as: SELECT * From client HAVING uuid = '1kvsg4oracxq' What exactly is the difference between where...
asked by 09.06.2017 / 21:06
4
answers

Select mysql accent showing question mark " " [duplicate]

Today I migrated my site to the hostgator and this problem happened, the accents are all with some characters The files are all with correct accent in the database My collation in the database is like: utf8_general_ci I'm using meta...
asked by 26.04.2014 / 00:23
2
answers

What do I save in a login session?

I am developing a login system in PHP and MySQL for an administration panel, and I have seen many "secure" login systems where they store the user login or password in the session, when they are not both or until all the user logged in data....
asked by 02.11.2014 / 13:32
2
answers

Identify if coordinate set is within a radius in Android

I want to delimit a radius from a central coordinate (the red marker in the figure) and, from a set of coordinates (the green markers), check if they are within the area delimited by this radius. > How to identify, from a set of coordinates (...
asked by 25.03.2015 / 02:11
3
answers

How to select all but one specific column?

You can select all columns in a table: SELECT * FROM wp_rw_programacao WHERE id = $id But I need to eliminate the id column from the result. Is it possible?     
asked by 19.10.2017 / 17:09
3
answers

Query to get sum 1024 in max 3 transactions

I want to display the names of people ( recipient ) who received at least 1024 in a maximum of 3 transactions. Here the transfers table: sender | recipient | date | amount ------------+------------+-----------...
asked by 29.03.2017 / 22:22