본문 바로가기

DB(SQL)

[DB] Server SQL Modes

반응형

The Most Important SQL Modes

The most important sql_mode values are probably these:

  • ANSI
  • This mode changes syntax and behavior to conform more closely to standard SQL. It is one of the special combination modes listed at the end of this section.
  • STRICT_TRANS_TABLES
  • If a value could not be inserted as given into a transactional table, abort the statement. For a nontransactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement. More details are given later in this section.
  • TRADITIONALNote
  • With TRADITIONAL mode enabled, an INSERT or UPDATE aborts as soon as an error occurs. If you are using a nontransactional storage engine, this may not be what you want because data changes made prior to the error may not be rolled back, resulting in a partially done update.
  • Make MySQL behave like a traditional SQL database system. A simple description of this mode is give an error instead of a warning when inserting an incorrect value into a column. It is one of the special combination modes listed at the end of this section.

When this manual refers to strict mode, it means a mode with either or both STRICT_TRANS_TABLES or STRICT_ALL_TABLES enabled.

 

docs.oracle.com/cd/E17952_01/mysql-5.6-en/sql-mode.html#sql-mode-setting

 

5.1.10 Server SQL Modes

Make MySQL behave like a “traditional” SQL database system. A simple description of this mode is “give an error instead of a warning” when inserting an incorrect value into a column. It is one of the special combination modes listed at the end of t

docs.oracle.com

dev.mysql.com/doc/refman/8.0/en/sql-mode.html

 

MySQL :: MySQL 8.0 Reference Manual :: 5.1.11 Server SQL Modes

The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients, depending on the value of the sql_mode system variable. DBAs can set the global SQL mode to match site server operating requirements, and each

dev.mysql.com

study-ymj.tistory.com/entry/mysql%EC%97%90%EC%84%9C-int-%EC%9E%90%EB%A3%8C%ED%98%95%EC%97%90-string%EC%9D%84-%EB%84%A3%EC%9C%BC%EB%A9%B4-%EB%93%A4%EC%96%B4%EA%B0%88%EA%B9%8C

 

mysql에서 int 자료형에 string을 넣으면 들어갈까?

MySQL에서 int자료형인 칼럼에 string 자료형인 값을 넣으면 과연 들어갈까? 답은 들어갈때도 있고, 아닐때도있다. 그 의미인 즉, MYsql sql_mode에 따라 다르다. sql_mode = 'ANSI' 인 경우 들어가고, sql_mode =.

study-ymj.tistory.com

 

반응형

'DB(SQL)' 카테고리의 다른 글

[SQL] Pushing  (0) 2021.06.02
[DB] DB 참조 사이트  (0) 2021.05.17
[DB] DataBase 운영 시 참고할만한 사이트 및 도서  (0) 2021.04.15
[DB Tool] Database Tool List  (0) 2021.03.30
[MySQL] utf8 vs utf8mb4 차이는?  (0) 2021.03.04