zoukankan      html  css  js  c++  java
  • Oracle sql1 2010.10.10

     1 select * from books;
    2 select * from author;
    3 select isbn,title from books;
    4 select firstname,lastname,address from customers;
    5 select category as "种类",title "书名" from books;
    6 select retail-cost as "利润" from books;
    7 select cost*1.1 as "newCost" from books;
    8 select cost*1.1 as "newCost" from books order by cost asc;
    9 select state from customers order by state asc;
    10 select distinct state from customers order by state asc;
    11 select unique state,firstname from customers order by state asc;
    12 select distinct city,state from customers order by city asc;
    13 select firstname||' ' ||lastname as "姓名" from customers;
    14 select lname||','||fname from author;
    15
    16 chaper 4
    17 select * from books where category='COMPUTER';
    18 select * from customers where state = 'CA' order by customer# asc;
    19
    20 select isbn,title,cost from books where cost>20 order by cost;
    21 select isbn,title,retail-cost from books where retail-cost>10 order by retail-cost;
    22
    23 select * from books where ISBN='1915762492';
    24
    25 select pubdate from books where pubdate='21-1月 06';
    26 select pubdate from books where pubdate=TO_DATE('2006/1/21','YYYY/MM/DD');
    27 select pubdate ,to_char(pubdate,'YYYY-MM-DD') from books;
    28
    29 select distinct state from customers where state != 'FL' order by state;
    30 select distinct state from customers where state >='FA' order by state ;
    31
    32 select * from books where cost between 19 and 30 order by cost;
    33 select * from customers where state in ('FL','CA');
    34 select * from books where category in ('COOKING','COMPUTER') order by category;
    35
    36
    37 Create view newbooks (title) as select title from books;
    38 select title from newbooks;
    39 DROP VIEW newbooks;
    40
    41 select table_name from tabs;
    42 select table_name from all_tables;
  • 相关阅读:
    三星t5拆解
    一条 SQL 引发的事故,同事直接被开除!!
    Git 不能提交空目录?我也是醉了!
    Redis 6.0.8 紧急发布,请尽快升级!
    String.format() 图文详解,写得非常好!
    为什么 Redis 要比 Memcached 更火?
    Lambda 表达式入门,这篇够了!
    天啊,为什么我的 Redis 变慢了。。
    写出一手烂代码的 19 条准则!
    Redis 面试一定要知道的 3 个 问题!
  • 原文地址:https://www.cnblogs.com/javadu/p/2205773.html
Copyright © 2011-2022 走看看