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

首頁(yè) > 數(shù)據(jù)庫(kù) > MySQL > 正文

常用mysql操作

2024-07-24 13:00:33
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
PHP中常用的幾個(gè) mysql 語(yǔ)句
顯示數(shù)據(jù)庫(kù)或表:
    show databases;//然后可以u(píng)se 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;
創(chuàng)建索引: 
    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插入語(yǔ)句:
    insert into table_name (c_1,c_2)
        values ('x1',1);
update語(yǔ)句:
    update  table_name set c_1 =1 where c_2=3;
刪除數(shù)據(jù)庫(kù)或者表:
    drop table table_name;
    drop database database_name;//使用mysql_drop_db()可以刪除的.
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 湘乡市| 哈巴河县| 桐梓县| 丽水市| 贵阳市| 勃利县| 新河县| 怀宁县| 龙泉市| 长宁县| 静宁县| 陵水| 漠河县| 天长市| 高青县| 东至县| 鱼台县| 南召县| 乐清市| 特克斯县| 五华县| 屏南县| 卓尼县| 平果县| 望都县| 洪湖市| 江城| 公安县| 宜章县| 繁峙县| 平原县| 邻水| 洪湖市| 襄城县| 宜章县| 安达市| 共和县| 尤溪县| 宜州市| 小金县| 竹山县|