Search
 
SCRIPT & CODE EXAMPLE
 

SQL

insert data into multiple tables mysql

BEGIN;
INSERT INTO users (username, password)
  VALUES('test', 'test');
INSERT INTO profiles (userid, bio, homepage) 
  VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com');
COMMIT;
Comment

mysql insert into multiple tables

BEGIN;
INSERT INTO users (username, password)
  VALUES('test', 'test');
INSERT INTO profiles (userid, bio, homepage) 
  VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com');
COMMIT;
Comment

PREVIOUS NEXT
Code Example
Sql :: procedure syntax 
Sql :: switch users mysql 
Sql :: compare field sql server 
Sql :: oracle boolean to varchar 
Sql :: no suitable driver found for sqlite 
Sql :: retrieve all data from a one row in mysql 
Sql :: Postgres format number to 2 decimal places 
Sql :: how to join multiple table in mysql 
Sql :: mariadb search columns 
Sql :: prisma transaction 
Sql :: Question 7: Write an SQL query to print details of the Workers who have joined in Feb’2014. 
Sql :: mysql pass command from command line 
Sql :: cascade syntax in sql 
Sql :: join vs inner join 
Sql :: sql where clause 
Sql :: mysql having 
Sql :: sql length 
Sql :: mysql create view 
Sql :: select all columns except one sql 
Sql :: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails 
Sql :: SQL CREATE INDEX Constraint 
Sql :: mysql select non integer values 
Sql :: mysql show create db 
Sql :: sql replace null values with another column 
Sql :: oracle job session 
Sql :: psql owner of database 
Sql :: min and max salary and name in sql 
Sql :: desc sql 
Sql :: sqlite select regex 
Sql :: plpgsql 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =