Some MySQL Query:

1. show processlist;

2. show tables;

3. use database_name;

4. discribe tablename;

5. select * from table_name;

6. GRANT ALL PRIVILEGES ON *.* TO ‘root’@’192.168.0.207’ IDENTIFIED BY ‘pkadmin’ WITH GRANT OPTION

7. CREATE TABLE `user` (

`id` int(11) NOT NULL auto_increment,

`username` varchar(40) NOT NULL default ”,

`userpwd` varchar(40) NOT NULL default ”,

PRIMARY KEY (`id`),

KEY `username` (`username`,`userpwd`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

5 Responses to “MySQL”

  1. prafulkr Says:

    I am facing one problem in PL/SQL. I have tried to explain the question, can you give the solution of the problem…..the solution needs to be in a single query( without using cursors of database).

    The Question was…
    there is a table with 3 fields
    1) Empname varchar(10)
    2) Ontime datetime
    3) Status bit 1- Working 0-not working

    the tbl name is ‘EmpTbl’

    Write a query without using temp table to get output as 4 colums
    1) Empname
    2) starttime
    3) endtime
    4) duration (endtime – starttime )

    here starttime is Ontime corr: to status=1 and end time is Ontime when status=0 in record following….

    ex.
    emp1 10.00 1
    emp1 10.15 0
    emp1 10.30 0
    emp1 10.45 1
    emp1 11.00 1
    emp1 13.30 1
    emp1 14.00 0 and so on

    =======O/P====
    emp1 10.00 10.15 15min
    emp1 10.30 14.00 3hr 30min
    and so on
    You can ask anyone you know…. but reply even if you did not got the solution

    Bye,

    I am hoping some one can give the solution but no one else than me

  2. xyz Says:

    I am facing one problem in PL/SQL. I have tried to explain the question, can you give the solution of the problem…..the solution needs to be in a single query( without using cursors of database).

    The Question was…
    there is a table with 3 fields
    1) Empname varchar(10)
    2) Ontime datetime
    3) Status bit 1- Working 0-not working

    the tbl name is ‘EmpTbl’

    Write a query without using temp table to get output as 4 colums
    1) Empname
    2) starttime
    3) endtime
    4) duration (endtime – starttime )

    here starttime is Ontime corr: to status=1 and end time is Ontime when status=0 in record following….

    ex.
    emp1 10.00 1
    emp1 10.15 0
    emp1 10.30 0
    emp1 10.45 1
    emp1 11.00 1
    emp1 13.30 1
    emp1 14.00 0 and so on

    =======O/P====
    emp1 10.00 10.15 15min
    emp1 10.30 14.00 3hr 30min
    and so on
    You can ask anyone you know…. but reply even if you did not got the solution

    Bye,

    I am hoping some one can give the solution but no one else than me


  3. wnz Een plaatje zegt alles, toch ? msn Het volledige rapport is hier te vinden. Lees natuurlijk e de blogposting. d o
    Thanks for interesting post! bxw
    [url=http://skuper.ru]ламинированный парке[/url] 6g

  4. prafulkr Says:

    You too..
    Nice to see you ламинат again..

Leave a comment