sql 中 update , alter , modify , delete , drop 的区别和使用

关于update和alter:
update是用来将衣柜改成书架的。
alter是用来将厨房改成厕所的。
把卧室改成厕所:
alter table 你家 change 厨房 厕所 varchar(8);
在你的家里面加一个厕所:
alter table 你家 add 厕所 varchar(8);(8表示厕所8平米)
修改厕所大小:
alter table 你家 modify (厕所 varchar(100));
把厕所更名为洗手间:
alter table 你家 rename column 厕所 to 洗手间;
摧毁厕所:
alter table 你家 drop column 厕所;
而把衣柜改成书架:
update 你家 set 衣柜=书架 where ……;(没有where的话,所有的房间里面的衣柜全部变成了书架)。
update 你家 set 衣柜=null where ……;删除衣柜。

delete和drop:
delete是删除衣柜或者删除书架的;
drop是删除房间的;
删除一个衣柜:
delete from 你家where ID=衣柜;
即使删除完了数据,表结构还是有。
删除一个卫生间:
alter table 你家 drop column 厕所;
删除一个数据库:
drop database 你家;

alter,change,convert,modify,shift,transform,vary 区别

我们先看几道题,试试看你能不能全部蒙对哈,这是看你的语感

1.If your coat is too long,the tailor can___it to fit you.
A.alter B.convert C.change D.modify
2.Great ___ have taken place since he left.
A.alters B.converts C.changes D.transforms
3.He used to be a Christian,but he is now___ to Buddhism.
A.converted B.changed C.transformed D.reformed
4.Prices that ___ with the quality.
A.shift B.vary C.convert D.alter
5.The wind has ___ from north to south.
A.shifted B.converted C.altered D.transformed
6.Many military factories have been ___ into civil ones in order to meet the needs of the country.
A.altered B.varied C.shifted D.transformed
7.The inventor ___ his original design in order to increase the machine’s effiency.
A.exchanged B.converted C.modified D.cultivated

答案与翻译
1.If your coat is too long,the tailor can alter it to fit you.
如果你的衣服太大,裁缝会给你改的合身.
2.Great changes have taken place since he left.
他走后变化很大.
3 He used to be a Christian,but he is now converted to Buddhism.
他过去是一个基督教徒,现在改信佛教.
4.Prices that vary with the quality.
价格随质量不同而变化.(vary with…随…而变化)
5.The wind has shifted from north to south.
风向从北转到了南.
6.Many military factories have been transformed into civil ones in order to meet the needs of the country.
为了适应国情的需要,我们把很多军用工厂改成了民用工厂.
7.The inventor modified his original design in order to increase the machine’s efficiency.
发明者改变原来的设计目的是提高机器的效率.

亲做对了几个?一起来看下这几个词的区别吧~并一起看下英文释义~
alter,change,convert,modify,shift,transform,vary都含有一定的”改变”之意
alter 改变,变更,指衣服等表面或局部做部分变动,而没有变成另一种事物
Meaning To change or make different; modify: altered my will.
change 改变,变更,指位置,性质,外表,形式或是数量与质量等改变.常与into连用.
Meaning:
a. To cause to be different: change the spelling of a word.
b. To give a completely different form or appearance to; transform: changed the yard into a garden.
convert 使转变,变化,一般只表示事物的外表及用途等方面发生的次要变化,而不是本质上的巨大变化,也可用于改变某人的政治观点、信仰.这个词义是其他词所没有的
Meaning:
1. To change (something) into another form, substance, state, or product; transform: convert water into ice.
2. To change (something) from one use, function, or purpose to another; adapt to a new or different purpose: convert a forest into farmland.
modify 修改,变更,较正式,常用以表示意见,计划或形式,质量方面不大的变化
Meaning: To change in form or character; alter.
shift 指位置或方向的移动,改变
Meaning
1. To exchange (one thing) for another of the same class: shifted assignments among the students.
2. To move or transfer from one place or position to another.
3. To alter (position or place).
4. To change (gears), as in an automobile.
transform 指外形或面貌的改变,彻底改变性格,性质等
Meaning:
1. To change markedly the appearance or form of: “A thick, fibrous fog had transformed the trees into ghosts and the streetlights into soft, haloed moons” (David Michael Kaplan).
2. To change the nature, function, or condition of; convert.
vary 改变,不同,有区别,变化
Meaning:
1. To make or cause changes in the characteristics or attributes of; modify or alter.
2. To give variety to; make diverse: vary one’s diet.

通过以上的英汉双解释,大家是不是对这7个词有了更深刻的了解呢?那么再做一遍开始的选择题吧,相信这次你会进步很大哦~

形而上学是什么意思

亚里士多德把人类的知识分为三部分,用大树作比喻:
第一部分,最基础的部分,也就是树根,是形而上学,它是一切知识的奠基;
第二部分是物理学,好比树干;
第三部分是其他自然科学,以树枝来比喻。

中文译名“形而上学”是根据《易经·系辞》中“形而上者谓之道,形而下者谓之器”一语,由晚清著名学者严复翻译而来。