Skip to content
Advertisement

Tag: mysql

List of all table and column level privileges for a MySQL database

What is the easiest way to list all table-level and column-level privileges for a MySQL database? I need to know what level of customized access has been granted for a specific database and which users have fine-tuned access to certain tables and/or columns. Answer To list table level privileges, you can query the INFORMATION_SCHEMA.TABLE_PRIVILEGES table. The TABLE_PRIVILEGES table has these

IF Exists then update in mysql

New to MySQL, need help in translating the next query to MySQL If exists (select * from INFORMATION_SCHEMA.COLUMNS where table_name= ‘MyTable’ and column_name = ‘MyColumn’) begin …

SQL CASE WHEN (1=1) What is the 1=1 doing?

I have a SQL statement that I did not write and I am trying to get my head around it. CASE WHEN (1 = 1) THEN A.AMT WHEN (A.ACC_NO = ‘1’) THEN A.AMT – 100000000 WHEN (A.ACC_NO = ‘2’) THEN …

how to do a few queries MYSQL

this is my homework, i am searching. total 17 question.I couldn’t make 5 questions but i am trying, trying.. list the number of books each student reads. But next to those who do not read the book …

Advertisement