》迪卡尔积显示结果》 原始的连表查询mysql> select * from stu,teacher where stu.tid = teacher.id;±—±-------±-----±—±------±-----------+| id | name | tid | id | name | info |±—±-------±-----±—±------±-...
新手发帖,很多方面都是刚入门,有错误的地方请大家见谅,欢迎批评指正 项目中用到的一些Sql(oracle下的)总结: 1、查找表的全部索引(包含索引名,类型,构成列) select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.tabl
项目中用到的一些Sql(oracle下的)总结:
1、查找表的所有索引(包括索引名,类型,构成列)
1 select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_n
select * from all_tab_comments
-- 查询所有用户的表,视图等
select * from user_tab_comments
-- 查询本用户的表,视图等
select * from all_col_comments
--查询所有用户的表的列名和注释.
select * from
create table employees (
id int(5) not null auto_increment ,
name varchar(8) not null,
primary key (id)
)
type=innodb;
create table payroll(
id int(5) not null,
emp_id int(5) not null,
na
一、删除数据提示有外键约束 二、直接删掉或者先删掉关联表外键的数据再来删除主表的数据 SET foreign_key_checks = 0;关掉约束 delete from t_xxx where xxxid = '60';执行删除数据 SET foreign_key_checks = 1;打开约束 ...