Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sql queries

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-08 : 09:40:37
Raju writes "I have a table called emp,dept. The structure of the table is

Emp table
-----------

Empno varchar Not NULL
Empname varchar Not Null
Dateofbirth date/time Null
Age numberic Null
Salary numberic Null
Deptno int Null -- foriegn key to Dept(allow to NULL)


My query is while inserting into Emp table , how to pass the NULL value for deptno.(int value)

insert into emp(empno,empname,dateofbirth,age,salary,deptno)
values('10','Raju','10/03/2001',27,6000,????)

Dept Table
----------
Deptno int Not Null
Deptname varchar Not Null
Location varchar Null



Expecting your answer ASAP

Thanks and Regards

Raju"
   

- Advertisement -