添加数据(insert):
insert into table_name (column_name1,column_name2...) values(data1,data2...);通过其他数据表向表中添加数据:insert into table_name1 (column_name1,column_name2...) selectcolumn_name1,column_name2... from table_name2;
创建表并通过源数添加数据:
create table_name1 as select column_name1,column_name2...from source_table;
修改数据(update)
update table_name column_name1=data1,column_name2=data2,... {where condition};
删除数据(delete)
delete from table_name {where condition};
查询数据(select)
select * from table_name {where condition};
其他操纵语句:
无条件删除表语句:
truncate table table_name;
merge语句:
merge [into] table_name1 using table_name2 on (condition)
when matched then merge_update_clausewhen not matched then merge_insert_clause;
评论回复