在建好的表里新添了一个字段,并设置默认值,该怎么做? ALTER TABLE tablenameADD (columnname datatype [DEFAULT expr] [, column datatype]...); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 回复人: luckysxn(风花雪) ( ) 信誉:130 2002-12-18 16:59:00 得分:0 ALTER TABLE tablenameADD (columnname datatype [DEFAULT expr] [, column datatype]...); alter talbe tablename add (aaa varchar2 default "this is a text"); alter talbe test add (aaa varchar2(20) default 'this is a text');应该可以了吧? 你用ORACLE的自带工具不就好了,想看语句,点一下SHOW SQL 分两步了,alter table test add (your_t_name varchar2(30));update test set tname your_t_name='ddddddd';commit; Oracle 日期查询问题 求半年数据的SQL文,用相减的方式求得,希望各大虾指教帮忙! 透明网关速度问题,在线等待,请多指教!! 如何优化SQL语句速度? 大家帮我看看为什么我写的这条SQL效率这么低! 查询当前时间 oracle 10g 奇怪问题 怎样在一个Trigger中即时插入当时的时间? oracle没有right怎么办? 在表中 插入用户名的语句 问一下关于时间的问题 如何求出表中制定列冗余的数据?
ALTER TABLE tablename
ADD (columnname datatype [DEFAULT expr]
[, column datatype]...);
alter talbe tablename add (aaa varchar2 default "this is a text");
应该可以了吧?
alter table test add (your_t_name varchar2(30));
update test set tname your_t_name='ddddddd';
commit;