Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
store1
create table customers( CUST_ID INT NOT NULL, NAME VARCHAR(10) NOT NULL, ADDRESS VARCHAR(20), PRIMARY KEY (CUST_ID) ); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (1, 'Deekshitha', 'vishakapatnam'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (2, 'shabbu', 'vishakapatnam'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (3, 'lasya', 'hyderabad'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (4, 'sohel', 'vishakapatnam'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (5, 'mehaboob', 'karimnagar'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (6, 'sujatha', 'vishakapatnam'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (7, 'monal', 'warangal'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (8, 'akhil', 'vijayawada'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (9, 'abhijeeth', 'guntur'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (10,'priya', 'vishakapatnam'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (11,'shiva', 'warangal'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (12,'rajashekar', 'guntur'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (13,'divi', 'hyderabad'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (14,'Devi', 'vijayawada'); INSERT INTO CUSTOMERS (CUST_ID, NAME, ADDRESS) VALUES (15,'nagarjuna', 'vijayawada'); create table products( product_id int not null, product_name varchar(20), price int not null, primary key (product_id) ); insert into products (product_id, product_name, price) values (1, 'mugs', 199); insert into products (product_id, product_name, price) values (2, 'boxes', 299); insert into products (product_id, product_name, price) values (3, 'vases', 399); insert into products (product_id, product_name, price) values (4, 'plant holders', 250); ALTER TABLE CUSTOMERS ADD PRODUCT_ID INT; ALTER TABLE CUSTOMERS ADD FOREIGN KEY (PRODUCT_ID); REFERENCES PRODUCTS(PRODUCT_ID) SELECT * FROM CUSTOMERS; select * from products;
run
|
edit
|
history
|
help
0
Trabalho.Agrecação
code
range and pattern matching
exercise
Rextester implements OUTPUT feature of Update ~ Delete (2016 >)
Las reglas Codd para una base de datos relacional Bry
SinghDestiny
2021-03-06_LeetCodeSQL
Insert multiple parent-child records
SQL - Find series of timestamps with small gaps