1.将表名和字段名改为大写 见--http://www.cnblogs.com/wenboge/articles/4121331.html 2.将表名和字段名改为小写 ①改表名为小写 begin for c in (select table_name tn from user_tables where table_name <> lower(table_name)) loop begin execute immediate 'alter table '||c.tn||' rename to
先创建一张表: -- 创建用户表 CREATE TABLE user10( id SMALLINT UNSIGNED KEY AUTO_INCREMENT, username ) NOT NULL UNIQUE, password ) NOT NULL, email ) NOT NULL DEFAULT 'a@a.com', age , addr ) NOT NULL DEFAULT '北京', salary ,2), regTime INT UNSIGNED, face ) NOT NULL
来源于网上整理 总结了一下oracle中查询表的信息,包括表名,字段名,字段类型,主键,外键唯一性约束信息,索引信息查询SQL如下,希望对大家有所帮助: 1.查询出所有的用户表select * from user_tables 可以查询出所有的用户表select owner,table_name from all_tables; 查询所有表,包括其他用户表 通过表名过滤需要将字母作如下处理 select * from user_tables where table_name = upper('表
2015-08-27 php大力力021.mysql表名在mac下不能大写 刚才数据库里面,phpMyAdmin狂出错. Some errors have been detected on the server! Please look at the bottom of this window. Notice in ./libraries/structure.lib.php#1868 Undefined index: Rows Backtrace ./libraries/structure.li
ORACLE建表时如果表名或者字段名存在大小写同时存在的情况下,默认为区分大小写,此时在select/updata等操作时需要在表名或者字段名上添加双引号,否则会报"视图不存在"的错误,为了规避此问题,我们需要使用如下建表语句如下(这样建立表名及字段名均为大写): BEGIN DECLARE cnt integer := 0; BEGIN SELECT 1 INTO cnt FROM dual WHERE exists(SELECT * FROM user_tables WHERE t
意:本篇文章仅适用于mysql和postgre这两种数据库 1.查询数据库中所有表名及对应表的详细信息 select * from INFORMATION_SCHEMA.tables 2.根据指定名称查询表名(也可模糊查询,可查询表的详细信息) select * from INFORMATION_SCHEMA.tables where table_name = 'eguid'; select * from INFORMATION_SCHEMA.tables where table_name l
删除表: DECLARE @Table NVARCHAR(30) DECLARE tmpCur CURSOR FOR SELECT name FROM sys.objects WHERE TYPE='U' AND name LIKE N'HSUPA%' OPEN tmpCur FETCH NEXT FROM tmpCur INTO @Table WHILE @@FETCH_STATUS = 0 BEGIN DECLARE @sql VARCHAR(100) SELECT @sql = 'drop
批量将表名变为大写 begin for c in (select table_name tn from user_tables where table_name <> upper(table_name)) loop begin execute immediate 'alter table "'||c.tn||'" rename to '||c.tn; exception when others then dbms_output.put_line(c.tn||'已存在');