国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

揭秘10條PHP中用的mysql語句

2024-07-24 12:43:08
字體:
來源:轉載
供稿:網友
10條PHP中用的mysql語句

顯示數據庫或表:
    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 (’x1’,1);
update語句:
    update  table_name set c_1 =1 where c_2=3;
刪除數據庫或者表:
    drop table table_name;
    drop database database_name;//使用mysql_drop_db()可以刪除的.
 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汉源县| 马关县| 康定县| 锡林浩特市| 新化县| 运城市| 花莲市| 邢台市| 合山市| 涿州市| 南部县| 阿克| 新竹市| 克东县| 北票市| 喀喇| 锡林郭勒盟| 满城县| 保山市| 册亨县| 衡山县| 衡水市| 丰都县| 伊金霍洛旗| 衡东县| 孝义市| 安远县| 商水县| 长寿区| 平山县| 安平县| 辽阳市| 聊城市| 自治县| 临沧市| 泽州县| 龙海市| 南涧| 雅安市| 广平县| 鄂伦春自治旗|