elect select_expr [,select_expr....]
[
from table_references
[where where_condition]
[group by {col_name | position} [asc | desc],...]
[having where_condition]
[order by {col_name | expr | position} [asc | desc, ...]
[limit {[offset,] row_count | row_count offset offset}]
]
[
from table_references
[where where_condition]
[group by {col_name | position} [asc | desc],...]
[having where_condition]
[order by {col_name | expr | position} [asc | desc, ...]
[limit {[offset,] row_count | row_count offset offset}]
]
更改下回复:索引的名字基本上就是字段的名字,而每一个约束对应着一个索引(跟数组一样),约束的名字可以自己设定通过contraint ..来设置,不设置的话有些约束会自己设置名字(比如外键约束)
2017-06-26
索引名字就是约束的名字,在约束名字没有提前设置的情况下和所设置字段同名,想看是什么约束,用create table db_name一目了然,不用看老师说的show indexes。。。那个命令,就这么简单,此处终结所有疑问
2017-06-26
用户定义函数中,用RETURNS 子句指定该函数返回值的数据类型
return用于返回具体的值/值变量
return用于返回具体的值/值变量
2017-06-25
mysql> SELECT p.type_id,p.type_name,s.type_name FROM tdb_goods_types AS p LEFT JOIN tdb_goods_types AS s
-> ON s.parent_id = p.type_id WHERE p.type_id =1;
-> ON s.parent_id = p.type_id WHERE p.type_id =1;
2017-06-25
我知道了,
->SELECT s.type_id,s.type_name,p.type_name FROM tdb_goods_types AS s LEFT JOIN tdb_goods_types AS p
-> ON s.parent_id = p.type_id;
->SELECT s.type_id,s.type_name,p.type_name FROM tdb_goods_types AS s LEFT JOIN tdb_goods_types AS p
-> ON s.parent_id = p.type_id;
2017-06-25