使用CONCAT()函数 mysql向表中某字段后追加一段字符串(field为字段名): update table_name set field=CONCAT(field,'str',) mysql 向表中某字段前加字符串update table_name set field=CONCAT('str',field)…
forms表单 #_*_coding:utf-8_*_ from django import forms class regis(forms.Form): username = forms.CharField(label=u'用户名',min_length=4,max_length=20,error_messages={'required':u'用户名不能为空哦','min_length':u'用户名长度不能小于4位哦','max_length':u'用户名长度不能大于20位哦'}) passw…
( SELECT sum( a.cost_sum ) AS sum_cost, sum( a.phone_sum ) AS sum_phone, sum( a.arrive_sum ) AS sum_arrive, FORMAT( ) AS arrive_cb, a.time AS time FROM ( SELECT FROM_UNIXTIME( time, "%Y-%m-%d" ) AS time, sum( cost ) AS cost_sum, sum( arrive_true…
--获取所有数据库名: SELECT name FROM master..sysdatabases WHERE name NOT IN ( 'master', 'model', 'msdb', 'tempdb', 'northwind','pubs' ) --获取某数据库的所有表: SELECT name FROM YiDianTongV2..sysobjects Where xtype='U' ORDER BY name --获取所有表名 --XType='U':表示所有用户表; --XTyp…