標籤: 將4月20到目前時間段的銷售狀態全部改成未售(1),銷售時間改成null(0)UPDATE hy_car_detail hcd SET hcd.sales_date = ‘‘,hcd.sales_status = ‘1‘ WHERE hcd.car_id IN ( SELECT hc.car_id FROM hy_car hc WHERE hc.car_date BETWEEN (SELECT UNIX_TIMESTAMP (‘2016-04-20 00:00:00‘
標籤:在mysql中建立表時,在新加的欄位時間上,碰到下面的問題:建表語句如下:CREATE TABLE seckill(seckill_id bigint NOT NULL AUTO_INCREMENT COMMENT ‘商品庫存id‘,name varchar (120) NOT NULL COMMENT ‘商品名稱‘,number int NOT NULL COMMENT ‘庫存數量‘,start_time timestamp NOT NULL COMMENT
標籤:character mysql 中文 my.cnf[client] default-character-set=utf8[mysqld] character_set_server=utf8 (5.6版本為這個格式,5.5以前的版本據說是另外的格式)mysql> show variables like ‘coll%‘;+----------------------+
標籤:1.普通查詢select * from info; #查詢所有內容select Code,Name from Info #查詢某幾列2.條件查詢select * from Info where Code=‘p001‘ #條件查詢select * from Info where Nation =‘n001‘ and Sex= true #條件之間並的關係select * from Info where Nation = ‘n001‘ and sex = ‘1‘select * from
標籤:進階查詢1.串連查詢(對列的擴充)第一種形式select * from Info,Nation #會形成笛卡爾積select * from Info,Nation where Info.Nation = Nation.Code #加入篩選條件select Info.Code,Info.Name,Sex,Nation.Name from Info,Nation where Info.Nation = Nation.Code#查詢指定列select Info.Code as
標籤:#1預存程序create procedure greeting()BEGIN # 77 = 16 FOR username + 60 for hostname + 1 for ‘@‘DECLARE user CHAR(77) CHARACTER SET utf8;SET user = (SELECT CURRENT_USER());IF INSTER(user, ‘@‘) > 0 THENSET user = SUBSTRING_INDEX(user, ‘@‘,1);END IF;
標籤:首頁面代碼:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style>.liu{
標籤:Vagrant搭建(Tomcat8+JDK7+MySQL5+dubbo)JDK1.下載jdk2.解壓JDKtar -xzvf jdk-7u79-linux-x64.tar.gz 3.設定環境變數vim /home/vagrant/.bashrc 這裡因為我用的vagrant所以提示: The program ‘vim‘ can be found in the following packages:* vim* vim-gnome* vim-tiny* vim-athena* vim-