易截截图软件、单文件、免安装、纯绿色、仅160KB

简单的SQL面试题

1. Q. What is a join?
   A. Join is a process of retrieve pieces of data from different sets (tables) and returns them to the user or program as one joined collection of data.
2. Q. Can a table have more than one foreign key defined?
   A. A table can have any number of foreign keys defined. It can have only
       one primary key defined.
3. Q. List all the possible values that can be stored in a BOOLEAN data field.
   A. There are only two values that can be stored in a BOOLEAN data field:
         -1(true) and 0(false).
4.  Q. What is a stored procedure?
    A. A procedure is a group of PL/SQL statements that can be called by
        a name. Procedures do not return values they perform tasks.
5.  Q. What is Normalization?
    A. The process of table design is called normalization.
6.  Q. Write a SQL SELECT sample of the concatenation operator.
    A.  SELECT LastName ||',' || FirstName, City from Students;
7. Q. Is the WHERE clause must appear always before the GROUP BY clause in SQL SELECT ?
    A. Yes.
The proper order for SQL SELECT
clauses is: SELECT, from, WHERE, GROUP BY, HAVING, ORDER BY.
Only the SELECT and from clause are mandatory.
8. Q. Which operator do you use to return all of the rows
from one query except rows are returned in a second query?
    A. You use the MINUS operator to return all rows from one query except
where duplicate rows are found in a second query. The UNION operator
returns all rows from both queries minus duplicates. The UNION ALL operator
returns all rows from both queries including duplicates.
The INTERSECT operator returns only those rows that exist in both queries.
9. Q. Which of the following statements are Data Manipulation Language commands?
A. INSERT
B. UPDAT


相关文档:

SQL WHERE 1=1

1=1或者'a'='a'等等恒等式是T-SQL中表达true的方法。因为在T-SQL中没有true这样的关键
字或值,所以需要借助这些恒等式来表达true的概念。
相对的,同样可以使用1<>1或者1=2等来表达false。
在应用程式的安全性方面,使用这些式子是SQL注入的基本原理,所以在拼接SQL语句的时候要过滤各种各样的敏感字
符。
当然 ......

PL/SQL 中文乱码解决方案

1. 使用的是服务器上的,不是本机的Oracle,按下面做就可以了:
    设置环境变量:NLS_LANG,具体值用下面查询的值:
SELECT 'AMERICAN_AMERICA.' || PROPERTY_VALUE
from DATABASE_PROPERTIES
WHERE PROPERTY_NAME = 'NLS_CHARACTERSET';
2. 如果是本机的Oracle就需要在Oracle的安装目录下面改设置:
......

sql安装问题

一、情况说明
    sql server 2000以前的版本,例如7.0一般不存在多个版本,只有标准版跟桌面版,用户如果不清楚该装什么版本的话,可按安装上的
安装先决条件指示安装,一般在WIN2000 服务器版上装标准版,其他的系统装桌面版的就可以;而SQL Server 2000安装问题就比较大,时常
见到的问题如下:
......

在c#中的取得sql存储过程的output参数

一直没有找到一种好的方法来引用有返回值的存储过程的方法,使我在添加数据中走了不少的弯路,最近,在查阅了大量的资料之后,终于在微软的一个实例中找到了一种良好的方法。
首先编写好一有返回值的存储过程
create procedure proc_name
   @para1 nchar(20),    --输入参数
   @ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号