MySQLѧϰ(2)ʱ¼äÀàÐÍ
DAT_E,TIM_E,DAT_ETIME,TIM_ESTAMP,Y_EAR
MySQLÖ§³Ö¶àÖÖ¸ñʽ»¯·½Ê½£¬²åÈëʱ¿ÉÒÔÊÇ×Ö·û´®£¬¿ÉÒÔʹÊý×Ö¡£
MySQL´ú±í×Ö·û´®µÄ·½Ê½ÓÐÁ½ÖÖ£¬Ò»Êǵ¥ÒýºÅ£¬ÁíÒ»ÖÖÊÇË«ÒýºÅ¡£
ÓÖÒ»´ÎÌύʧ°Ü£¬¿´À´CSDNµÄBUG»¹ÊǺܴóµÄ¡£
ÔÒò»ù±¾È·¶¨£¬ÊÇÒòΪDATE£¬TIME£¬DATETIME£¬TIMESTAMP£¬YEARΪMySQLÊý¾ÝµÄ¹Ø¼ü×Ö£¬Ò²ÊÇÆäËûÊý¾Ý¿âµÄ¹Ø¼ü×Ö£¬²åÈëʱ¾Í»á±¨´í£¬Õâʱºò¿É¼û׼ȷµÄ´íÎóÌáʾµÄÖØÒªÐÔ¡£
Ïà¹ØÎĵµ£º
ÓÃÔÚSELECTºÍWHERE×Ó¾äµÄº¯Êý
--------------------------------------------------------------
1 ·Ö×麯Êý
( ... ) À¨ºÅ¡£Ê¹ÓÃËüÃÇÀ´Ç¿ÖÆÔÚÒ»¸ö±í´ïʽµÄ¼ÆËã˳Ðò¡£
--------------------------------------------------------------
2 ³£ÓõÄËãÊõÔËËã
£¨+ - * /£©
Ò»°ãµÄË ......
mysqlÊÇÒ»¸öÓÅÐãµÄ¿ªÔ´Êý¾Ý¿â£¬ËüÏÖÔÚµÄÓ¦Ó÷dz£µÄ¹ã·º£¬Òò´ËºÜÓбØÒª¼òµ¥µÄ½éÉÜÒ»ÏÂÓÃpython²Ù×÷mysqlÊý¾Ý¿âµÄ·½·¨¡£python²Ù×÷Êý¾Ý¿âÐèÒª°²×°Ò»¸öµÚÈý·½µÄÄ£¿é£¬ÔÚhttp://mysql-python.sourceforge.net/
ÓÐÏÂÔØºÍÎĵµ¡£
ÓÉÓÚpythonµÄÊý¾Ý¿âÄ£¿éÓÐרÃŵÄÊý¾Ý¿âÄ£¿éµÄ¹æ·¶£¬ËùÒÔ£¬Æäʵ²»¹ÜʹÓÃÄÄÖÖÊý¾ ......
package com.qll.operate;
import java.sql.*;
public class OperateUser {
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/test";
String name = "root";
String password = "123456";
static Connection conn = null;
Statement st = ......
create procedure getInfor2()
BEGIN
declare _abc varchar(200);
declare stopFlag int;
DECLARE cursor_name CURSOR
FOR
select zhuanyuan from server;
DECLARE CONTINUE HANDLER FOR NOT FOUND set stopFlag=1;
OPEN cursor_name;
REPEAT
FETCH cursor_name INTO _abc;
begin
if _abc='root'
the ......
MySQLµÄÒ²Ö§³Ö´æ´¢¹ý³Ì£¬º¯Êý£¬´¥·¢Æ÷¡£
ÒÔϸ÷¸ö¹¦ÄܵÄÏêÊö£¬Ö÷ÒªÊÇʾÀý¡£
/**1.¶¨Òå·Ö¸î·û*/
DELIMITER //
/**2.´´½¨º¯Êý-¼ÆËãÁ½ÊýÖ®ºÍ*/
CREATE FUNCTION f_sum(num1 INT,num2 INT) RETURNS INT
BEGIN
RETURN num1+num2;
END;
//
/**
*3.´´½¨´æ´¢¹ý³Ì
*˼·£º3.1.Óиô洢¹ý³ÌÔòɾ³ý£¬3.2ÓÐʹÓõÄÖмä±í ......