How to disable only_full_group_by? [duplicate] - mysql

This question already has answers here:
Disable ONLY_FULL_GROUP_BY
(35 answers)
Closed 2 years ago.
I am facing with problem to disable it. I was looking some explanation step by step,but i can't find. Please anyone can help me about this?

You can reset global variable ##sql_mode - but you need to be careful not removing other parameters that could be part of it.
Here is one approach:
set global sql_mode = (select replace(##sql_mode,'ONLY_FULL_GROUP_BY', ''));
Note that disabling this sql mode is usually an indication of bad design in some of your queries. I would not actually recommend doing this; instead, you should put more effort into writing queries that comply to the SQL standard as regard to group by behavior.

Related

MySQL 8 get the currently used (default) database name [duplicate]

This question already has answers here:
How to determine which database is selected
(5 answers)
Closed 2 years ago.
You may use USE statement
USE <db_name>
to use the named database as the default
but how to get the name of the database that is currently used?
So if USE sets the db name, is there a kind of GET or SELECT statement to read database that was set as the default?
Suppose you get a result of a query after many hours and you forgot what particular database that query was targeting. It would be helpful to be able to ask for the default database name to know which database that query result refers to.
You can just do:
select database()

MS Access Append Query is corrupt [duplicate]

This question already has answers here:
Getting Error 3340 Query ' ' is corrupt while executing queries DoCmd.RunSQL
(10 answers)
Closed 3 years ago.
A recent Microsoft security update KB 4484119 has had an adverse effect and makes append queries corrupt.
Does anyone know if there any patches for this yet?
We have tried the manual work around, which is ok for us who know how to do this but our clients do not have expertise or confidence to try this.
Progress will be posted on the official support page:
Access error: "Query is corrupt"

Remove length restrictions on GROUP_CONCAT() [duplicate]

This question already has answers here:
MySQL "Row 30153 was cut by GROUP_CONCAT()" error
(2 answers)
Closed 4 years ago.
I came across a poorly designed MySql table by previous developer where I need to group_concat very long strings. Due to my company’s contract I’m not allowed to alter the design (nor change the query). I’m looking for a way to increase the length of the output. I came across a query with which a length can be set but valid for a single session.
Edit 1:
Suggestion provided by Madhur Bhaiya is not persistent, it only holds true for a given session.
To make changes for a specific session, you can use the following:
SET GLOBAL group_concat_max_len=15000;
Also, to make changes global, you can set the same in MySQL config files. Depending on your server configuration, make the changes in specific mysqld config files. Make sure the setting is under the [mysqld] group header
[mysqld]
group_concat_max_len=15000
After making the changes, you can Restart the MySQL server.

How to solve case sensitive issue in mysql VIEW [duplicate]

This question already has answers here:
How to change MySQL table names in Linux server to be case insensitive?
(6 answers)
Closed 6 years ago.
My my.cnf config file is with:
lower_case_table_names = 2
so if table name is "MyUsers" it will take as it is.
but in view: i have used as a "myusers".
in windows its working.
Now when i am trying to execute it(view) in linux server then it is saying "myusers" doesnt exists.
what is the problem in linux and its corresponding solution.
Not Duplicate: As I clearly mentioned what I need and what I get. This is in view.
MySQL users files for tables and views. The name of the files are identical to those of the tables as created. Windows is case-insensitive as far as addressing files is concerned. Linux is not, meaning that you can have the files myfile.txt and Myfile.txt at the same folder.
There is no way out (I learned this in the past as you are learning it now). You MUST use table/views names with the same case as they are defined. Column names, on the other hand, are case insensitive.

In Sql Server What is Noncount? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
SET NOCOUNT ON usage
What is "NOCOUNT ON" in sql server, what it is do, where we can use it.
It used to set ON/OFF the message that shows the count of the number of rows affected.