Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id first_name last_name email phone
- ------------------------------------------------------------------------
- 1 Michael Turley mturley@whatever.com 555-123-4567
- 2 John Dohe jdoe@whatever.com
- 3 Jack Smith jsmith@whatever.com 555-555-5555
- 4 Johnathan Doe 123-456-7890
- id first_name last_name email phone
- ------------------------------------------------------------------------
- ? John Doe jdoe@whatever.com 123-456-7890
- DELETE FROM customers WHERE id = 4;
- UPDATE customers
- SET first_name = 'John',
- last_name = 'Doe',
- email = 'jdoe@whatever.com',
- phone = '123-456-7890'
- WHERE id = 2;
- UPDATE orders, rewards, receipts
- SET customer_id = 2
- WHERE customer_id = 4;
- use information_schema;
- select table_name from columns where column_name = 'customer_id';
- SELECT `TABLE_NAME`
- FROM `information_schema`.`KEY_COLUMN_USAGE`
- WHERE REFERENCED_TABLE_SCHEMA='DATABASE'
- AND REFERENCED_TABLE_NAME='customers'
- AND REFERENCED_COLUMN_NAME='customer_id'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement