2023-10-10 16:37:49 +08:00
|
|
|
INSERT INTO db.tb ;
|
|
|
|
|
|
|
|
SELECT * FROM db.;
|
|
|
|
|
|
|
|
CREATE TABLE db. VALUES;
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS db.a;
|
|
|
|
|
|
|
|
CREATE OR REPLACE VIEW db.v;
|
|
|
|
|
|
|
|
DROP VIEW db.v ;
|
|
|
|
|
|
|
|
CREATE FUNCTION fn1;
|
|
|
|
|
2023-10-12 17:08:21 +08:00
|
|
|
SELECT name, calculate_age(birthday) AS age FROM students;
|
2023-10-10 16:37:49 +08:00
|
|
|
|
|
|
|
CREATE DATABASE db;
|
|
|
|
|
|
|
|
DROP SCHEMA IF EXISTS sch;
|
2023-11-28 21:18:44 +08:00
|
|
|
|
|
|
|
SELECT co;
|
|
|
|
|
|
|
|
SELECT ;
|
|
|
|
|
|
|
|
INSERT INTO tb ( );
|
|
|
|
|
|
|
|
SELECT * FROM tb1 ORDER BY tb.c;
|
|
|
|
|
|
|
|
CREATE TABLE newtb ( id INT, n );
|
|
|
|
|
|
|
|
MERGE INTO tablename USING tablename2 ON (tablename.id = tablename2.id) WHEN MATCHED THEN UPDATE SET tablename.col ;
|
|
|
|
|
|
|
|
ALTER TABLE tbl CHANGE COLUMN ;
|
|
|
|
|
2024-03-26 14:28:27 +08:00
|
|
|
ALTER TABLE tbl CHANGE COLUMN tbl.oldcol new ;
|
|
|
|
|
|
|
|
FROM table_name_1 SELECT col1, col2;
|
|
|
|
|
|
|
|
FROM a JOIN b ON (a.id = b.id AND a.department = b.department) SELECT a.*;
|
|
|
|
|
|
|
|
FROM page_view_stg INSERT;
|