mysql中TIMESTAMP类型和其他的类型有点不一样(在没有设置explicit_defaults_for_timestamp=1的情况下)
1、在默认情况下,如果TIMESTAMP列没有显式的指明null属性,那么该列会被自动加上not null属性(而其他类型的列如果没有被显式的指定not null,那么是允许null值的),如果往这个列中插入null值,会自动的设置该列的值为current timestamp值
2、表中的第一个TIMESTAMP列,如果没有指定null属性或者没有指定默认值,也没有指定ON UPDATE语句。那么该列会自动被加上DEFAULT CURRENT_TIMESTAMP和ON UPDATE CURRENT_TIMESTAMP属性。
3、第一个TIMESTAMP列之后的其他的TIMESTAMP类型的列,如果没有指定null属性,也没有指定默认值,那么该列会被自动加上DEFAULT '0000-00-00 00:00:00'属性。如果insert语句中没有为该列指定值,那么该列中插入'0000-00-00 00:00:00',并且没有warning
如果我们在启动的时候在配置文件中指定了explicit_defaults_for_timestamp=1,mysql会按照如下的方式处理TIMESTAMP 列
1、此时如果TIMESTAMP列没有显式的指定not null属性,那么默认的该列可以为null,此时向该列中插入null值时,会直接记录null,而不是current timestamp。
2、不会自动的为表中的第一个TIMESTAMP列加上DEFAULT CURRENT_TIMESTAMP 和ON UPDATE CURRENT_TIMESTAMP属性,除非你在建表的时候显式的指明
3、如果TIMESTAMP列被加上了not null属性,并且没有指定默认值。这时如果向表中插入记录,但是没有给该TIMESTAMP列指定值的时候,如果strict sql_mode被指定了,那么会直接报错。如果strict sql_mode没有被指定,那么会向该列中插入'0000-00-00 00:00:00'并且产生一个warning
文章最后更新时间:
2019年01月17日 21:26:51
สมัครเอเย่นต์เว็บตรง Yes! Finally someone writes about สมัครเอเย่นต์เว็บตรง.
ufabetรับตัวแทนเดิมพันเว็บสล็อตออนไลน์ What's up, yeah this article is in fact pleasant and I have learned lot of things from it regarding blogging. thanks.
ufabetบอลสดเอเย่นต์เล่นบอลครบทุกคู่ Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your next post thanks once again.
Online poker
หลายค่ายเกมที่กำลังพัฒนาเกม เพื่อครอบคลุมแล้วก็สามารถสนองตอบของผู้เล่นที่เปลี่ยนแปลงไปตามทิศทางขงกเงินลไกการตลาด ด้วยรูปแบเกมที่ค่อยข้างง่ายอยู่แล้วนั้น ทางเว็บ บาคาร่า ออนไลน์ Lucabet เว็บไซต์บาคาร่า บาคาร่าออนไลน์ มีการปรับปรุงรูปแบบสำหรับเพื่อการเล่นให้ง่ายมากขึ้น มีเกมจำนวนมากนานัปการเกม หลายค่ายให้ท่านได้เลือกเล่นตามความพอใจ ความชื่นชอบ หรือแนวเกมที่ถนัด ได้เลย แต่ว่าทางเว็บ ก็ยังคงยืนหนึ่งในเรื่องของเกม บาคาร่า บาคาร่าออนไลน์ ด้วยเหตุว่า เว็บไซต์ Lucabet เปิดบริการมาอย่างยาวนานเป็นที่นิยมสูง กระทั่งเป็นเว็บ บาคาร่าออนไลน์ ชั้นดับในไทย และก็ติดหน้าอันดับที่หนึ่งสำหรับเพื่อการค้นหาของทวีปเอเชียอีกด้วย ทดลองเล่นบาคาร่า จากค่ายเกมบาคาร่าที่อธิบายไปก่อนหน้าที่ผ่านมานั้น เป็นค่ายที่ค่อยข้างครอบคลุมรวมทั้งมีชื่อมากมาย ไม่ว่าคุณจะเล่นผ่านเครื่องไม้เครื่องมือ หรือ แพลตฟอร์มไหน สะดวกทุกที่ ทุกเมื่อ สูตรบาคาร่า คุณก็มาสามารถ เข้ามาเป็นส่วนหนึ่งของเปิดประสบการณ์เกมพนันได้กำไรสูงกับเว็บไซต์ Lucabet เว็บไซต์บาคาร่าออนไลน์ ที่ครอบครองใจคนประเทศไทยไปแล้ว ยินดีต้อนรับทั้งคนเล่นการพนัน หรือ มือใหม่ฝึกฝนเล่นเกม พวกเราบริการตลอด 24 ชั่วโมง
ترکیب اسید کوجیک
It's billed as the happiest place on Earth with endless entertainment for children, but luckily there's some fun in it for the parents too. On Monday, Kate Hudson appeared to be having the time of her life - revved up by a few beers - as she took her family to Disneyland and Disney California Adventure Park (DCA), located next door to each other in Anaheim, California. The Oscar-nominated star looked pretty in a black maxi jumpsuit, adding a trucker hat with adorable black and white Minnie ears. While in DCA, Kate, 43, enjoyed alcoholic beverages with Danny, 36, and their pals, as well as munching on a pretzel. Cheers to magic! Kate Hudson and her family looked like they had the time of their life at Disneyland and Disney California Adventure Park (DCA), located next to each other in Anaheim, California. Kate, 43, enjoyed a beer while at the parks. Kate seen with Danny, 36 Their daughter Rani, three, looked sweet in her Cinderella look, with her son Bingham, 11, sporting a Star Wars helmet. DCA serves alcohol at a number of locations, including cocktails, beer and wine throughout
penis enlargement
Sept 24 (Reuters) - Spain suffered a 2-1 defeat by Switzerland as goals from Manuel Akanji and Breel Embolo knocked the hosts off the top of Nations League A-Group 2 on Saturday with one game left to play. The Swiss held firm against last year's finalists for most of the game and handed their rivals only their second home loss in almost 20 years and their first in Spain since 2018. The Spaniards are now in second place on eight points, having been leapfrogged by Portugal, who breezed past Czech Republic 4-0 away to reach 10 points. Cristiano Ronaldo's side will make the final four with at least a home draw in Tuesday's crunch game against Spain, who must win in Braga to qualify for the semi-finals. Switzerland are third on six points, two above than Czechs who they will face on Tuesday in a battle to avoid relegation. Akanji opened the scoring with a header from a corner in the 21st minute, but Jordi Alba equalised for the hosts with a cross-shot from a counter-attack 10 minutes after the break. Three minutes later, however, Embolo got the winner with a close-range strike from a corner after Akanji flicked the ball towards the six-yard-box where the striker turned it goalwards. "We played against rivals that were really aggressive, pressing, physically very strong, who prevented us from playing our style of soccer," Spain coach Luis Enrique told TVE. "We were not on target, really erratic, the worse I can remember since I've been coaching this team. "We need to fix that because now we have a final at Portugal. We need to go there and win. There is no other way." Despite having 70% possession, Spain lacked energy for most of the match and barely posed a threat to Yann Sommers goal until Alba scored with their first shot on target. The Swiss were comfortable sitting back and waiting for a pedestrian Spain who were unimaginative on an uninspired night for their highly-rated Barcelona midfielders Pedri and Gavi. It was not until very late in the second half that the hosts created chances but they were kept out by Sommer who made two critical saves to deny substitutes Marcos Llorente and Borja Iglesias. (Reporting by Fernando Kallas in Madrid