Hi Friends,
I want to know one thing, i have a database which contains few tables and few default records in that.
Sometimes unusually some developer is truncating the tables or else dropping the table without my knowlege.
How can i track these changes in my database?
Any answers will be most welcome and useful for me.
In Oracle, i heard that there are DDL and DML Triggers...
User Profile
Collapse
-
Tracking all DML and DDL Statements in Database Tables
-
Hi,
What are the values u have specified for that ENUM Field.
Just send the field name and the datatype details of the field.
Thanks,
Scarlet -
Hi Bharati,
May be this query work for you... Try this
SELECT
s.tran_empid AS EmpId,
e.M_EMPL_NAME AS EmpName,
p.PROJ_NAME AS Project,
t.TITL_NAME AS Title,
CASE
WHEN s.tran_param='Q uality' THEN
ROUND((SUM(s.tr an_revscore)/(s.tran_weighta ge/100)))
END AS Quality,
CASE
WHEN s.tran_param='E fficiency...Leave a comment:
-
-
To get all the Job-id with characters MAN and the salary greater than or equal to 2500.
That is,
The table has values
employee_id--last_name--job-id--salary
-------------------------------------------------------
1--person1--aman--3000
2--person2--bman--3500
3--person3--cman--1000
4--person4--dman--4000
5--person5--no--3000
6--person6--not--3000
...Leave a comment:
-
Hi,
May be this query will help you,
SELECT * FROM table2 INNER JOIN table1 ON (table2.Id1 = table1.Id1)
LEFT OUTER JOIN table3 ON (table2.Id2 = table3.Id2)
GROUP BY table1.Id1
HAVING COUNT(table1.Id 1) > 1;
Thanks,
Scarlet...Leave a comment:
-
Hi Ronald
Can u provide the syntax for getting the values as follows using format as u mentioned below.
001
002
00333
Thanks,
Scarlet...Leave a comment:
-
Hi,
May be this will help,
Try this query
SELECT * FROM table WHERE FORMAT(field,1) =4.8;
Thanks,
Scarlet...Leave a comment:
-
Hi,
The Syntax for the query is wrong:
Use the Below query,
SELECT TITLE, FNMI, SALUTATION, COMPANY, E_MAIL FROM DBASE WHERE BOARD IS NOT NULL OR CBM IS NOT NULL OR LEGIS IS NOT NULL;
There can't be Comma seperator in the query, i mean in the where clause of the query.
Thanks,
Scarlet...Leave a comment:
-
Hi,
Its so simple,try this query
SELECT Emailid,COUNT(E mailid) FROM User_account GROUP BY Emailid;
Thanks,
Scarlet...Leave a comment:
-
Hi,
We can only change the character set and collations at the time of database creation.
If u want to change the default storage engine for the tables in the database.
Then after creating the database, use the below query
SET table_type = '<The Storage Engine Name which has to be set as default';
Thanks,
Scarlet...Leave a comment:
-
Hi,
If u know the values to be shown as a static value for the value present in the DB.
Then use this query,
SELECT CASE job_category WHEN 's' THEN 'scientist' WHEN 't' THEN 'training' ELSE NULL END AS job_category FROM employee;
Thanks,
Scarlet...Leave a comment:
-
Hi Gomzi,
Try to define the datatype which supports Numeric,Charact ers and Special Characters.
For Ex:
Varchar
Text
.
etc
Thanks,
Scarlet...Leave a comment:
-
Hi,
Try this
SET @vValue := '456,465,123';
SET @vquery = CONCAT('select * from test_table where table_col in (', @vValue,');
PREPARE stmt from @vquery;
EXECUTE stmt;
Thanks,
Pimp...Leave a comment:
-
Doubt in Order by DATE Query
Hi Friends,
I have a table with field
Id--vDate
-------------
1--3/1/2007 12:00:00 AM
2--4/1/2007 12:00:00 AM
3--4/12/2007 5:28:15 PM
4--3/1/2005 12:00:00 AM
SELECT DATE_FORMAT(vDa te,'%b-%Y-%m'),ID FROM TEST ORDER BY DATE_FORMAT(vDa te,'%b-%Y-%m') DESC;
The query above doesn't give me the correct answer.
Can anyone tell me can i get the ascending... -
Help in update query
Hi friends,
table-1
-------
id--name--value
-------------
1--'Test'--'Test'
2--'Testing'--'Testing'
table-2
-------
id--name--value
---------------
1--'no'--'no'
2--'yes'--'yes' -- Want to update this row as per the values from the table-1 for the id =2 from table-1
How can i do this?
Thanks,... -
Hi Gomzi,
Try this
mysql> DELIMITER $$
mysql> DROP PROCEDURE IF EXISTS `tableselect` $$ CREATE PROCEDURE `tableselect`()
Query OK, 0 rows affected, 1 warning (0.00 sec)
-> BEGIN
-> select * from table_a;
-> END;
-> $$
Query OK, 0 rows affected (0.00 sec)
Thanks,
ScarletLeave a comment:
-
Try this query ....
SELECT type, gems, cost,MAX(price) ,MIN(price) FROM inventory GROUP BY germs.
Thanks,
ScarletLeave a comment:
-
-
Hi,
U need to select the first row from the table found in the database?
Then u can use this command
SELECT * FROM table LIMIT1;Leave a comment:
No activity results to display
Show More
Leave a comment: