开发者

Inserting a date into db2

开发者 https://www.devze.com 2023-01-18 19:40 出处:网络
How can I insert a date into db2 in开发者_如何转开发 this format: yyyy-mm-dd, using a sql query?Consider a table:

How can I insert a date into db2 in开发者_如何转开发 this format: yyyy-mm-dd, using a sql query?


Consider a table:

CREATE TABLE tab (dt DATE);

Now insert a date into it as:

INSERT INTO tab VALUES ('2010-12-31');

Now on doing

SELECT * from tab; 

we get:

DT
2010-12-31
0

精彩评论

暂无评论...
验证码 换一张
取 消