数据库(1)
什么是声明式语言
A:
Programming models. In SQL, we write queries, and so we have a higher-level,declarative way of expressing the set of data that we're interested in. With imperative programming languages such as C# or VB.NET, we have to write for loops and if statements and so forth.
注意这就是sql 和 c#这些语言的区别,一个是声明式的语言,一个是程序式?的语言,因此不要使用循环,游标这些本不属于sql的方式处理sql
E:
经常看到在sql中使用大量的循环,或者游标,这样是不好的,sql是声明式的语言,要依据这个特性来处理sql.