“Insert postgres” Réponses codées

Retour des résultats de l'insert dans PostgreSQL

# to select specific columns
INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool') RETURNING id, firstname;
# to return every column
INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool') RETURNING *;
Emmanuel Mahuni

insérer dans les postgres

INSERT INTO table_name VALUES (
  column_one_value, column_two_value, column_N_value);
  
INSERT INTO table_name (column_x, column_y, column_z)
VALUES (column_x_value, column_y_value, column_z_value);

Energetic Eland

Insert postgres

INSERT INTO links (url, name)
VALUES('https://www.postgresqltutorial.com','PostgreSQL Tutorial');
Code language: SQL (Structured Query Language) (sql)
Faithful Onoriobakpo

Insérer à la table Postgres

INSERT INTO holiday_calender (hcl_country,hcl_company,hcl_date,hcl_description,hcl_active) VALUES
	 (2,1,'2022-05-21 00:00:00','Holiday 1',1),
	 (2,1,'2022-05-22 00:00:00','Holiday 2',1),
	 (2,1,'2022-05-23 00:00:00','Holiday 3',1),
	 (2,1,'2022-05-25 00:00:00','Holiday 4',1),
	 (2,1,'2022-05-26 00:00:00','Holiday 5',1),
	 (2,1,'2022-05-28 00:00:00','Holiday 6',1);
Satsara Gunaratne

Réponses similaires à “Insert postgres”

Questions similaires à “Insert postgres”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code