最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

SQL命令大全-中英文對照

 更新時(shí)間:2007年11月22日 22:36:10   作者:  

QUOTENAME() --函數(shù)返回被特定字符括起來的字符串
/*select quotename('abc', '{') quotename('abc')
運(yùn)行結(jié)果如下
----------------------------------{
{abc} [abc]*/

REPLICATE() --函數(shù)返回一個(gè)重復(fù)character_expression 指定次數(shù)的字符串
/*select replicate('abc', 3) replicate( 'abc', -2)
運(yùn)行結(jié)果如下
----------- -----------
abcabcabc NULL*/

REVERSE() --函數(shù)將指定的字符串的字符排列順序顛倒
REPLACE() --函數(shù)返回被替換了指定子串的字符串
/*select replace('abc123g', '123', 'def')
運(yùn)行結(jié)果如下
----------- -----------
abcdefg*/

SPACE() --函數(shù)返回一個(gè)有指定長度的空白字符串
STUFF() --函數(shù)用另一子串替換字符串指定位置長度的子串


----數(shù)據(jù)類型轉(zhuǎn)換函數(shù)----
CAST() 函數(shù)語法如下
CAST() (<expression> AS <data_ type>[ length ])
CONVERT() 函數(shù)語法如下
CONVERT() (<data_ type>[ length ], <expression> [, style])

select cast(100+99 as char) convert(varchar(12), getdate())
運(yùn)行結(jié)果如下
------------------------------ ------------
199 Jan 15 2000

----日期函數(shù)----
DAY() --函數(shù)返回date_expression 中的日期值
MONTH() --函數(shù)返回date_expression 中的月份值
YEAR() --函數(shù)返回date_expression 中的年份值
DATEADD(<datepart> ,<number> ,<date>) 
--函數(shù)返回指定日期date 加上指定的額外日期間隔number 產(chǎn)生的新日期
DATEDIFF(<datepart> ,<number> ,<date>)
--函數(shù)返回兩個(gè)指定日期在datepart 方面的不同之處
DATENAME(<datepart> , <date>) --函數(shù)以字符串的形式返回日期的指定部分
DATEPART(<datepart> , <date>) --函數(shù)以整數(shù)值的形式返回日期的指定部分
GETDATE() --函數(shù)以DATETIME 的缺省格式返回系統(tǒng)當(dāng)前的日期和時(shí)間

----系統(tǒng)函數(shù)----
APP_NAME() --函數(shù)返回當(dāng)前執(zhí)行的應(yīng)用程序的名稱
COALESCE() --函數(shù)返回眾多表達(dá)式中第一個(gè)非NULL 表達(dá)式的值
COL_LENGTH(<'table_name'>, <'column_name'>) --函數(shù)返回表中指定字段的長度值
COL_NAME(<table_id>, <column_id>) --函數(shù)返回表中指定字段的名稱即列名
DATALENGTH() --函數(shù)返回?cái)?shù)據(jù)表達(dá)式的數(shù)據(jù)的實(shí)際長度
DB_ID(['database_name']) --函數(shù)返回?cái)?shù)據(jù)庫的編號
DB_NAME(database_id) --函數(shù)返回?cái)?shù)據(jù)庫的名稱
HOST_ID() --函數(shù)返回服務(wù)器端計(jì)算機(jī)的名稱
HOST_NAME() --函數(shù)返回服務(wù)器端計(jì)算機(jī)的名稱
IDENTITY(<data_type>[, seed increment]) [AS column_name])
--IDENTITY() 函數(shù)只在SELECT INTO 語句中使用用于插入一個(gè)identity column列到新表中
/*select identity(int, 1, 1) as column_name
into newtable
from oldtable*/
ISDATE() --函數(shù)判斷所給定的表達(dá)式是否為合理日期
ISNULL(<check_expression>, <replacement_value>) --函數(shù)將表達(dá)式中的NULL 值用指定值替換
ISNUMERIC() --函數(shù)判斷所給定的表達(dá)式是否為合理的數(shù)值
NEWID() --函數(shù)返回一個(gè)UNIQUEIDENTIFIER 類型的數(shù)值
NULLIF(<expression1>, <expression2>)
--NULLIF 函數(shù)在expression1 與expression2 相等時(shí)返回NULL 值若不相等時(shí)則返回expression1 的值



--------------------------------------------------------------------------------

sql中的保留字

action add aggregate all 
alter after and as 
asc avg avg_row_length auto_increment 
between bigint bit binary 
blob bool both by 
cascade case char character 
change check checksum column 
columns comment constraint create 
cross current_date current_time current_timestamp 
data database databases date 
datetime day day_hour day_minute 
day_second dayofmonth dayofweek dayofyear 
dec decimal default delayed 
delay_key_write delete desc describe 
distinct distinctrow double drop 
end else escape escaped 
enclosed enum explain exists 
fields file first float 
float4 float8 flush foreign 
from for full function 
global grant grants group 
having heap high_priority hour 
hour_minute hour_second hosts identified 
ignore in index infile 
inner insert insert_id int 
integer interval int1 int2 
int3 int4 int8 into 
if is isam join 
key keys kill last_insert_id 
leading left length like 
lines limit load local 
lock logs long longblob 
longtext low_priority max max_rows 
match mediumblob mediumtext mediumint 
middleint min_rows minute minute_second 
modify month monthname myisam 
natural numeric no not 
null on optimize option 
optionally or order outer 
outfile pack_keys partial password 
precision primary procedure process 
processlist privileges read real 
references reload regexp rename 
replace restrict returns revoke 
rlike row rows second 
select set show shutdown 
smallint soname sql_big_tables sql_big_selects 
sql_low_priority_updates sql_log_off sql_log_update sql_select_limit 
sql_small_result sql_big_result sql_warnings straight_join 
starting status string table 
tables temporary terminated text 
then time timestamp tinyblob 
tinytext tinyint trailing to 
type use using unique 
unlock unsigned update usage 
values varchar variables varying 
varbinary with write when 
where year year_month zerofill  







相關(guān)文章

最新評論

富蕴县| 上思县| 奉贤区| 吉木萨尔县| 铁岭市| 襄垣县| 克拉玛依市| 青铜峡市| 北票市| 永嘉县| 安吉县| 逊克县| 锡林浩特市| 乐昌市| 罗江县| 边坝县| 松滋市| 垦利县| 万安县| 安福县| 班戈县| 城口县| 洪雅县| 安吉县| 双流县| 商洛市| 辉南县| 怀化市| 清水县| 庆安县| 林甸县| 鲁山县| 历史| 延川县| 海林市| 凉城县| 扶绥县| 白水县| 裕民县| 咸宁市| 乐昌市|