In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
-1. Basic table operation table drop table user1;create table user1 (id number (5Power3) not null,-- (NPowerM) N: a total of several digits, M: the last few decimal places name varchar2 (10) not null,tel number (11p0) not null); truncate table user1;insert into user1 (id,name,tel) values (23.456 id,name,tel values 22); insert into user1 (id,name,tel) values ((select max (id) from user1) + 1 minaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -- 2. Create table create table user2 as select * from user1;-- copy all fields and data create table user3 as select id,name from user1;-- copy specified fields and data create table user4 as select id gid, name gname from user1;-- set the new table field to the new name create table user5 as select id gid, name gname from user1 where 1 to 2 -- replication structure does not copy data-- 3. Tel-- add field ALTER TABLE "USER4" ADD ("tel" NUMBER (11) DEFAULT 13900001111 NOT NULL);-- delete field ALTER TABLE "USER4" DROP ("tel");-- change table name ALTER TABLE "USER5" RENAME TO "USER55";-- change field name ALTER TABLE "USER4" RENAME COLUMN "tel" TO "randomkey" -- change the attribute ALTER TABLE "USER4" MODIFY ("randomkey" VARCHAR2 (11) DEFAULT 'sha256');-- modify the default value ALTER TABLE "USER4" MODIFY ("GNAME" VARCHAR2 (20), "randomkey" VARCHAR2 (20))
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Wget-no-cookies-no-check-certificate header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; ora
© 2024 shulou.com SLNews company. All rights reserved.