顯示資料庫或表:
show databases;
use database_name;
show tables;
更改表名:
alter table table_name rename new_t;
新增列 :
alter table table_name add column c_n column attributes;
刪除列:
alter table table_name drop column c_n;
建立索引:
alter table c_table add index (c_n1,c_n2);
alter table c_table add unique index_name(c_n);
alter table c_table add primary key(sid);
刪除索引:
alter table c_table drop index c_n1;
更改列資訊:
alter table t_table change c_1 c_1 varchar(200);
alter table t_table modify 1 c_1 varchar(200);
insert插入語句:
insert into table_name (c_1,c_2) values ('info1','info2');
update語句:
update table_name set c_1 =1 where c_2=3;
刪除資料庫或者表:
drop table table_name;
drop database database_name;//使用mysql_drop_db()可以刪除的
oracle的一些SQL命令
第四章 1 邏輯備份 1 必備引數 exp system abc123 file d b.dmp 該命令並未指定登陸到哪個資料庫例項,因此,將使用系統環境變數 oracle sid 所指定的資料庫例項。2 owner 引數 exp system abc123 owner test,oracle fi...
一些基本的Linux命令
命令 help 檢視命令的幫助資訊 檔案許可權管理 r 讀 數值表示為4 w 寫 數值表示為2 x 可執行 數值表示為1 rwxr r 第乙個字元 表示檔案 第乙個字元 d 表示目錄 第乙個字元 l 表示鏈結 類似wiindows的快捷方式 第二三四個字元 rwx 表示當前所屬使用者的許可權 用數值...
linux一些基本的命令
首先找到那個檔案或者資料夾的目錄下在使用以下命令如果在 var www html 路徑下要壓縮這個路徑下的judgeonline這個資料夾 zip r 希望壓縮後的檔名 資料夾的路徑 壓縮乙個資料夾 例如 zip r oj.zip judgeonline tar xvf file.tar 解壓 ta...