-
连接的语法结构查看全部
-
但当展示给用户的时候就需要把商品名,类型名的真实信息显示给用户,要用到连接查看全部
-
日期时间型查看全部
-
浮点型查看全部
-
整数类型查看全部
-
给数据表减减肥查看全部
-
show columns from tdb_goods;查看全部
-
show columns from tdb_goods; 字段goods_cate brand_name显示的是仍然是字符型而不是数字,所以要修改字段属性以节省空间. 用change alter table tdb_goods change goods_cate cate_id smallint unsigned not null, change brand_name brand_id smallint unsigned not null ; show columns from tdb_goods;查看全部
-
select * from tdb_goods\G;查看全部
-
update tdb_goods inner join tdb_goods_brand on tdb_goods.brand_name = tdb_goods_brands.brand_name set tdb_goods.brand_name=tdb_goods_brands.brand_id; //也可以给两张表起别名 update tdb_goods as g inner join tdb_goods_brand as b on g.brand_name = b.brand_name set g.brand_name = b.brand_id;查看全部
-
update tdb_goods inner join tdb_goods_brand on brand_name = brand_name set brand_name=brand_id; //出现错误,提示为brand_name模糊不清的意思查看全部
-
select brand_name from tdb_goods group by brand_name; 按品牌来实验一下多表更新一步到位. create table tdb_goods_brands( brand_id smallint unsigned primary key auto_increment, brand_name varchar(40) not null) select brand_name from tdb_goods group by brand_name;查看全部
-
SELECT INTO是什么语句查看全部
-
多表更新之一步到位 创建数据表的同时将查询结果写入到数据表查看全部
-
CREATE TABLE tablename( ..... foreign key (字段名) references fathertable(字段名) on delete cascade/set null/no action/restrict )查看全部
举报
0/150
提交
取消