1. The constraints include: NOT NULL, primary key, foreign key, Unqiue
2. A check constraint restricts what values you can insert into a column. It uses the same conditional as a where clause. SQL Sample: create table piggy_bank{ id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, coin CHAR(1) CHECK( coin IN ('P','N','Q','D')) } 3. Create View View_name as (Select Clause)/Drop View view_name 4. Check Option checks each query you try to insert or update to see if it is allowed according to the where clause in your view. 5. An updatable view includes all the "NOT NULL" column from the table it references. 6. show tables/desc table_name 7. during a transaction, if all the steps can't be completed without interfence, none of them should be completed. 8. show create table table_name (show the sql statement<>) 9. Grant/Revoke action(select/insert/delete/update) on table to user_name 10. Grant option: allow the user to grant privillege to others
SQL Learning Tip 5
最新推荐文章于 2020-12-06 14:12:09 发布