ORACLE常用的SQL语句

来源:互联网 发布:mssql数据库 查询语句 编辑:程序博客网 时间:2024/05/22 05:30

增加表字段:alter table teacher add photo BLOB

oracle表中查询字段类型,字段注释说明,字段名:SELECT b.column_name column_name --字段名
                                                                                            ,b.data_type data_type     --字段类型
                                                                                            ,b.data_length             --字段长度
                                                                                            ,a.comments comments       --字段注释
                                                                                            FROM user_col_comments a
                                                                                           ,all_tab_columns b
                                                                                            WHERE a.table_name = b.table_name and
                                                                                            a.table_name = 'KSS_ZYRYJBXX';

删除表字段:ALTER TABLE kss_ajxx  DROP COLUMN WXDJ;

根据字段名称查询表名:select * from user_tab_columns where column_name='字段名';


1 0
原创粉丝点击