sql数据库基础语句



你想干嘛,看sql帮助文档吧,都是很基础的


查资料,field2) values(value1:select * from table1 where field1 like ’%value1%’ (所有包含‘value1’这个模式的字符串)---like的语法很精妙:select * from table1 where 范围
插入:select * from table1 order by field1:delete from table1 where 范围
更新:update table1 set field1=value1 where 范围
查找:insert into table1(field1选择,value2)
删除!
排序


查询语句:select
添加语句:insert into
删除语句:delete from


不知所云,范围这么大。。。
百度文库里去下载sql基础教程吧


<%@ import namespace=system.data %>
<%@ import namespace=system.data.sqlclient %>
<script language=vb runat=server>
sub page_load(sender as object , e as eventargs)
dim conn as new sqlconnection
conn.connectionstring = "server=(local);user id=sa;pwd=;database=库名" '用户为sa密码为空
conn.open()
dim sql as string = "select * from Adamin where Id='" + TextBox1.Text + "'"
dim objcmd as new sqlcommand(sql,conn)
dim objreader as sqldatareader = obj ... 展开 cmd.executereader()
if objreader.read() then
response.write("正确")
else
response.write("用户名不正确")
end if
objreader.close()
conn.close()
这里只判断了用户名.可根据实际加上密码.
收起



Copyright © 2009-2011 All Rights Reserved.