Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql modify default value

ALTER TABLE tbl_name ALTER column_name SET DEFAULT new_value;
Comment

mysql how to change default charset

mysql> SHOW VARIABLES LIKE 'char%'; SHOW VARIABLES LIKE 'collation%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

+----------------------+--------------------+
| Variable_name        | Value              |
+----------------------+--------------------+
| collation_connection | utf8mb4_general_ci |
| collation_database   | utf8mb4_unicode_ci |
| collation_server     | utf8mb4_unicode_ci |
+----------------------+--------------------+
3 rows in set (0.00 sec)
Comment

mysql how to change default charset

ALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Comment

PREVIOUS NEXT
Code Example
Sql :: drop foreign key mysql 
Sql :: insert query in ci 
Sql :: contains word in sql 
Sql :: mysql select and count left join 
Sql :: allsource oracle 
Sql :: mysql create database with collation 
Sql :: drop multiple databases mysql 
Sql :: null column to 0 in mysql 
Sql :: get only structure database mysql 
Sql :: sql server set variable if exists 
Sql :: Get Minimum from multiple columns sql 
Sql :: how to fetch first 5 characters in sql 
Sql :: join update query in sql 
Sql :: Add SuperUser MySQL 
Sql :: sql view where tables have same column name combine results 
Sql :: oracle trigger 
Sql :: how to get nearest location in mysql with latitude and longitude 
Sql :: SQL Server - Count number of times a specific character appears in a string 
Sql :: sql count distinct group by 
Sql :: update with inner join postgres 
Sql :: use concat in group_concat 
Sql :: DB: in eloquent using sql 
Sql :: sql mm/dd/yyyy format 
Sql :: mysql cdn link 
Sql :: sql update table set text to lowercase 
Sql :: sql count 
Sql :: sql pagination oracle 
Sql :: sql convert date to string yyyy-mm-dd 
Sql :: SQL DEFAULT Constraint With Alter Table 
Sql :: sql find duplicate records in two tables 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =