本文目录一览

1,SQL的经典语句有哪些

select sysdate from dual;
这有啥经典可言的,能解决问题的最简单的语句都是经典

SQL的经典语句有哪些

2,经典sql语句

增删改查都经典
……,这个baidu,google啊。。。select * from tableinsert into table (column1, column2, ...) values (value1, value2, value3)update table set field1 = value1 where field2 = value2delete table where field1 = value1
select,insert,update,delete,group by , order by, join 连接,and so on.
Select * from table...(查询表中的内容等)好多的吧

经典sql语句

3,简单的数据库语句

select * from table1 where ID not in (select ID from table2 where ....)
就是上面所说的select * from table1 where table.id not in(select table2.id from table2 )
该两种数据库的增删改查语句都一样,但是sql2005比mysql容易上手,就市场而言用mysql的比较多(免费),但是sql2005比较适合初学者
用一个嵌套查询建立两个表之间的关系查询语句就如上面几位朋友所说的:select * from table1 where ID not in (select ID from table2)先从table2中找出table2中所有的记录,在从table1中找出table1中所有的记录,然后通过"not in "比较出table2中没有而table1中有的记录.
select * from table1 where ID not in (select ID from table2)这个很OK
select * from table1 where ID not in (select ID from table2)

简单的数据库语句


文章TAG:数据  数据库  结构  经典  数据库结构经典语句有哪些  
下一篇