• SQL练习题36:现在在last_update后面新增加一列名字为create_date, 类型为datetime, NOT NULL,默认值为'0000-00-00 00:00:00'


    题目:

    存在actor表,包含如下列信息:
    CREATE TABLE IF NOT EXISTS actor (
    actor_id smallint(5) NOT NULL PRIMARY KEY,
    first_name varchar(45) NOT NULL,
    last_name varchar(45) NOT NULL,
    last_update timestamp NOT NULL DEFAULT (datetime('now','localtime')));
    现在在last_update后面新增加一列名字为create_date, 类型为datetime, NOT NULL,默认值为'0000-00-00 00:00:00'

    程序:

    ALTER TABLE actor
    ADD create_date datetime NOT NULL DEFAULT('0000-00-00 00:00:00')
    
  • 相关阅读:
    tty & pty & pts
    PageRank
    How to run a terminal inside of vim?
    vimdiff
    svn's tree conflict
    svn's diff command
    符号表分离
    gcc -D
    Options for Debugging Your Program or GCC
    invoking gdb
  • 原文地址:https://www.cnblogs.com/zhuozige/p/13820178.html
Copyright © 2020-2023  润新知