SQL

Sql Snippets

355 words
show tables SHOW TABLES command provides you with an option that allows you to filter the returned tables using the LIKE operator or an expression in the WHERE clause as follows: SHOW TABLES LIKE pattern; SHOW TABLES WHERE expression; lock a row START TRANSACTION SELECT * FROM x_tab WHERE id = 2 FOR UPDATE; UPDATE x_tab SET amount = amount + 5 WHERE id = 2; COMMIT rename table RENAME