How to create new table in SQL and set custom UTF-8 collation ?

How can I create a new table with custom UTF-8 collation, using SQL ? Is it possible or are there default server settings applied when creating a new table ?
0
give a positive ratinggive a negative rating
Hi,

You can set charset and collation when creating a new table, using SQL. You have to add Default charset and Collation to your SQL query:

CREATE TABLE users (
user_id INT(10) NOT NULL auto_increment,
user_name VARCHAR(30) NOT NULL,
user_surname VARCHAR(30) NOT NULL,
user_email VARCHAR(100) NOT NULL,
user_registration_date DATETIME NOT NULL,
user_status VARCHAR(1) ) DEFAULT CHARSET utf8, COLLATE utf8_general_ci;

Share on FacebookShare on TwitterShare on LinkedInSend email
1 answer
x
x
2025 AnswerTabsTermsContact us