SQL SERVER – 2008 – Interview Questions and Answers Complete List Download

SQL Server Interview Questions and Answers
Print Book Available (207 Pages) | Sample Chapters

Download SQL Server 2008 Interview Questions and Answers Complete List

UPDATE: This article series has been updated with new interview questions and answers series.

Interview is very important event for any person. A good interview leads to good career if candidate is willing to learn. I always enjoy interview questions and answers series. This is my very humble attempt to write SQL Server 2008 interview questions and answers. SQL Server is very large subject and not everything is usually asked in interview. In interview what matters the most is conceptual knowledge and learning attitude.

I have listed all the series in this post so that it can be easily downloaded and used. All the questions are collected and listed in one PDF which is here to download. If you have any question or if you want to add to any of the question please send me mail or write a comment.

SQL SERVER – 2008 – Interview Questions and Answers – Part 1

SQL SERVER – 2008 – Interview Questions and Answers – Part 2

SQL SERVER – 2008 – Interview Questions and Answers – Part 3

SQL SERVER – 2008 – Interview Questions and Answers – Part 4

SQL SERVER – 2008 – Interview Questions and Answers – Part 5

SQL SERVER – 2008 – Interview Questions and Answers – Part 6

SQL SERVER – 2008 – Interview Questions and Answers – Part 7

SQL SERVER – 2008 – Interview Questions and Answers – Part 8

Download SQL Server 2008 Interview Questions and Answers Complete List

Reference : Pinal Dave (http://blog.SQLAuthority.com)

159 thoughts on “SQL SERVER – 2008 – Interview Questions and Answers Complete List Download

  1. Well done, it must took you a good while to write these questions for the greater good

    I was wondering when the interview articles will finish, so I can print them double-sided

    now with the PDF, problem solved.

    Many thanks Pinal, from Canada

    Like

    • Hi Pinal,
      I am in delima..

      [removed privacy related information]

      If is store this string in sql2008 then can i make regex in sql query where i can extract each line independently. i.e. each line is equal to column value..

      Like

    • how to Create a procedure or method followed by the ID of the user with a statement of income and output and how to call to find out what product profits after a specific date

      Like

    • Use varbinary(max) column and openrowset

      INSERT INTO your_table(FileName, Document)
      SELECT 'Text1.txt' AS FileName,
      * FROM OPENROWSET(BULK N'C:\your_excel.xls', SINGLE_BLOB) AS Document

      But I would say it is better you store the file path to the table and keep the file in Server’s directory

      Like

      • hi…. madhivanan

        i want to create query to insert a document like our CV or Resume when we retrieve it

        INSERT INTO your_table(FileName, Document)
        SELECT ‘Text1.txt’ AS FileName,
        * FROM OPENROWSET(BULK N’C:\your_excel.xls’, SINGLE_BLOB) AS Document

        send me query to retrive word document through query.

        when i fire a query

        i hope u may respond me ASAP….

        byeee

        Regards
        sanju

        Like

  2. I have to design a script which would go thru the DB and extract a flat file of each pertinent table’s data(1 file/table).I have used DTS to export data from databases.I have never written a script for extraction.Could you please guide me on this and help me in getting started on how to write a script with a small example.Could you also please help me on how to run the script against the database so that it could generate a data file

    Do u usually reply to their email or post solutions here?

    Thanks

    Shveta

    Like

  3. hi Pinal,

    thanks a lot,……i think no book will give as much wealthy knowledge as your website gives…..this is the real place to learn a lot and that too your examples are amazing…..easy to understand and learn……..thanks a lot.

    Like

  4. My SQL statements are:

    CREATE TABLE doc_exe ( column_a INT CONSTRAINT column_a_un UNIQUE)
    GO

    ALTER TABLE doc_exe
    alter column column_a int identity(1,1)

    I get the error:

    Msg 156, Level 15, State 1, Line 2
    Incorrect syntax near the keyword ‘identity’.

    Please explain or correct the sytax.

    Thanx

    Like

  5. Hi Pinal,
    I have table structure with data like below. all columns are key columns.

    Col1 col2 col4
    a1 c 1
    b1 a 1
    c1 b 1
    d2 b 2
    b2 c 2
    c2 a 2
    a2 d 2
    b3 a 3
    a3 d 3

    But I want a query to get first record group by col4. the resultset should be
    Col1 col2 col4
    a1 c 1
    d2 b 2
    b3 a 3

    Please guide me to get a query.

    Thanks,

    Like

  6. Hello Sir,

    The information there on this blog is very useful & helpful thanks for providing such informative infromation.

    Sir i have a query in ms-sql server2000
    can we convert numeric(18,0) to identity(1,1) which will be primary key ,
    since this ID numeric(18,0) is a foreign key in another table so i wanted that this key should be as primary auto incrementing key

    whereas i am also unable to do insert into statement for the same
    error ocuuring is as : Cannot insert explicit value for identity column in table

    Can you please help me out.

    Like

  7. Pingback: SQL SERVER - Interesting Interview Questions Journey to SQL Authority with Pinal Dave

  8. Dear Pinal Dave

    Really your are doing marvels Job I would like to appreciate your effort and Pray from God you always maintain this effort for deprived person like me.

    Regard
    Muhammad Junaid Babar

    Like

  9. Pingback: SQL SERVER - Interesting Interview Questions - Part 2 - Puzzle Journey to SQL Authority with Pinal Dave

  10. Pingback: SQL SERVER - Interesting Interview Questions - Revisited Journey to SQL Authority with Pinal Dave

  11. Pingback: SQL SERVER - Top Five Articles of Year 2008 Journey to SQL Authority with Pinal Dave

  12. Hi Pinal,

    In your pdf, you have mentioned that “Update Statistics will updates indexes on tables” which is incorrect. Update statisitics will only update stats. For updating indexes you need to rebuild indexes.

    Also you have mentioned that select rows from sysindexes is a accurate way of getting rowcount which is also incorrect. If statistics is outdated then this would not give you accurate result.

    AD

    Like

  13. Pingback: SQL Server Interview Questions and Answers - Introduction Journey to SQL Authority with Pinal Dave

  14. Pingback: SQL Server Interview Questions and Answers - Part 1 Journey to SQL Authority with Pinal Dave

  15. Pingback: SQL Server Interview Questions and Answers - Part 2 Journey to SQL Authority with Pinal Dave

  16. Pingback: SQL Server Interview Questions and Answers - Part 3 Journey to SQL Authority with Pinal Dave

  17. Hi Dave,

    I’m very new to SQL server. I dont know anything about SQL.I am in SQL administrator destination.Could you please guide with any training materials. Thank you

    Regards,
    Krishna

    Like

  18. Pingback: SQL SERVER - 2008 - Interview Questions and Answers - Part 4 Journey to SQL Authority with Pinal Dave

  19. Pingback: SQL SERVER - 2008 - Interview Questions and Answers - Part 3 Journey to SQL Authority with Pinal Dave

  20. Pingback: SQL SERVER - 2008 - Interview Questions and Answers - Part 7 Journey to SQL Authority with Pinal Dave

  21. HI Dave,

    I want to make a good career in DBA so will you please tell me what will I do to get good career in MS SQL
    Could you please guide me what I do for getting more knowledge in SQL
    Please give me advice.

    Like

  22. Hello Mr Dave

    Im Sudha..i found ur site today when i was searching for sql server material….My doubt is i want to take sql server 2008 certification..could you plz tell me which is best i mean sql server 2005 r 2008 i didnt take any exam so which is best i mean

    MCTS: Microsoft SQL Server 2005

    • MCTS: Microsoft SQL Server 2005 Business Intelligence

    • MCTS: Microsoft SQL Server 2008, Business Intelligence Development and Maintenance

    • MCTS: Microsoft SQL Server 2008, Database Development

    • MCTS: Microsoft SQL Server 2008, Implementation and Maintenance

    could u plz tell which one is best.

    Thanks
    Sudha

    Like

  23. I am getting this kind of error. during the installation i didnt give any login name and password . so what to enter here as login name i dont know.i tried some of them ur solution still give me same error. My Os is window vista and if i try to see service from computer management does not give me service of sql server.

    please help me out.

    TITLE: Connect to Server
    ——————————

    Cannot connect to 76.194.236.194.

    ——————————
    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 3)

    Like

  24. Hi,
    I was going thru your interview question collection. In your question “What is difference between DELETE & TRUNCATE commands?” you have mentioned that “TRUNCATE cannot be rolled back”. But I believe this in NOT true and we can rollback a truncate statement.
    For example:
    Create table #test (I int)
    Insert into #test values (1)
    Begin tran
    Truncate table #test
    Rollback
    Select * from #test
    Drop table #test

    The above code snippet returns a value 1. Could you please tell me how this is possible?

    Regards,
    Rakesh

    Like

  25. i want to build my career in database.
    could u tell me for which certification should i go?
    i mean ORACLE or SQL2008.
    someone told me that sqlserver2008 will be the best. i m getting confused. pls suggest me.
    I m pursuing MCA final year from regular.

    thanks
    paramjeet singh

    Like

  26. I want to learn SQL 2008 and installed, but no front end, like query analyzer, or query developer installed, am I missing something, I tried installing the SQL Management Studio_x86_ENU studio but none looks like installed on my system, my operating system is Windows Vista Ultimate.
    Please, guide me, your help is appreciated. – Thank you.

    Best regards
    udmalla

    Like

  27. I have install sql server 2005 in vista ultmate without any problem but not any database is install tell me how can I intall the database and I am not able to write any sql query.

    Like

  28. Dear @param,

    It has been observed that microsoft copies the idea from other softwares or products and make their own one.

    However, I’d recommend that If you are really interested in database then you should go for Oracle.

    There’s so many reasons but I’ll not going in depth.

    Thanks!

    Like

  29. Pingback: SQL SERVER – 2008 – Interview Questions and Answers – Part 5 Journey to SQL Authority with Pinal Dave

  30. Hi Pinal ,

    I have written the query in MDX Query Editor in SOL Server 2008 Successfully,
    But the problem is when we implement the same query in Cube(as expression in calculated measure) its not working in SSAS 2008

    The Error is:- Select statement is not correct in MDX Expression

    Like

  31. Hi Pinal,

    I have a query for you, Can we write a select query to select only nth row from a table without using where clause?

    This question was asked to me in one of my interview.

    Regards,
    Ashwin Shende

    Like

  32. @Ashwin

    Without a WHERE clause? That’s an interesting question. That answer is yes, though it is inefficient. If the only the second record is wanted:

    DECLARE @A TABLE (A INT);
    INSERT INTO @A SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3;

    SELECT TOP(1)
    A
    FROM
    (
    SELECT TOP(2)
    A
    FROM
    @A
    ORDER BY
    A
    ) A
    ORDER BY
    A DESC;

    Like

  33. Pingback: SQLAuthority News – 1200th Post – An Important Milestone Journey to SQL Authority with Pinal Dave

  34. Dave, i take issue with this statement: “Identity/GUID columns do not need to be indexed.” I will agree the statement is correct IF YOU NEVER USE THE COLUMN (but then i would submit the column exists for no valid reason, and that’s a different discussion).

    Often, the identity column is used as a surrogate primary key (and very often because the table designer was too lazy to figure out what data element(s) uniquely identify the row — again, a different discussion).

    If the identity column is used as a primary key in this table, and then as a foreign key in other tables, the identity column must ABSOLUTELY be indexed (unless the table is so small that it is always in memory… or unless you enjoy table scans).

    there is no automatic creation of an index on an identity column, and there is no automatic clustering of data based upon that identity column.

    Like

  35. hello,
    how r u, i have a request based on sql server. how to insert bulk records into the data base? i know how to insert one record at a time

    Like

  36. @Swetha,

    Bulk Insert inserts huge number of records from another source (outside SQL Server) into SQL Server.

    Why you want to use Bulk Insert when you want to insert one record at a time.

    What is the your requirement why you want to insert one record at a time, Of-course there are many ways of doing it

    But why use Bulk Insert when you do not want to take advantage of its features ?

    Please provide us more details so that we can suggest you most optimal solution.

    ~ IM.

    Like

  37. Hi, Pinal

    We are considering to migrate from SQL Server 2000 to 2008. I think the version 2008 should be backward compatible.

    Would like to check is there any changes like those command being used in 2000 could not be used (not supported) in the version 2008? as I overheard in the past where some of the version 2000 cmd no longer applicable in version 2008.

    I need your advice,pls.

    THanks in advance.

    Like

  38. Hi Pinal,
    I have learnt lot of thing from your site.

    I want to know more about performance tuning in sql server 2005. What is the possible questions on performance tuning.

    Please let me know if it is possible.

    Like

  39. Hi Dave,

    I am fresher, I want to know the usage of

    SET ANSI_PADDING ON/OFF

    with clear explanation and practical example

    Many thanks & regards in advance,
    Naveen

    Like

  40. Actually, I am .NET developer. But most of the compnies requires that we have strong knowledge of SQL too. You article helped a lot.

    One thing I want to share with you. Some of my friends gave interview in Patni Computers, Gandhinagar for .NET. They were asking questions about SQL only (for .NET positions). They were asking question of Database administrator level (Database mirroring, SSIS, DTS packages etc.) Do you think, all .NET developer should have DB Admin level of SQL knowledge?

    Like

  41. I am calling sp_oaCreate to add DTS package in SQL Server 2008 64 bit environment.

    I am getting an error “Class not registered”. When I googled I found that MS do not support sp_oa*** system stored procedures in SQL Server 2008 64 bit environment.

    My requirement is to execute the DTS package from Stored proc and get the data. I am using sp_oa*** sp to do this.

    Now I cannot use sp_oa*** in SQL Server 2008 64bit envi. Is there any other solution?

    Like

  42. Hello Pinal

    please check if you can help about the below topic
    This is just an interview question i got from one of interviewer. for which I did not knew answer.
    Any insight on this welcome..

    If we have dimension tables loaded and used surrogate keys for processing. Now what happens is the we loaded fact table too. What happens if the dimension tables gets corrupted and we do not have any backup of the dimension tables. So will the fact table still funstional and will give us correct results. Is there any we can get out dimension tables back from the fact table (keep in mind there is surrogate key used).
    Do we need to rebuild the fact table by rebuilding the dimension table. Will it cost much time reuilding fact table. Is there any approach besides this.

    Like

  43. Hi Pinal,

    Can you please help me with a script to automate the backup process and archive the old backups which also includes the transaction log backups and differential.

    Thank you

    Like

  44. Hi Pinal,

    I have learnt lot of thing from your site.

    I want to know more about performance tuning in sql server 2005. What is the possible questions on performance tuning.

    You can identify the possible issues using Microsoft’s SQL Server 2008 Upgrade Advisor tool.

    Please let me know if it is possible

    Like

  45. Hi there,

    I created a publication using sql 2008 serve. the publication was deleted. I want to know if there is a way to discover the computer that connected to the server and deleted this publication. Any Help?

    Like

  46. In the following table, RESPONSES counts how many times SEGMENT has responded on CHECKED date.
    CREATE TABLE #TEST (ID INT, SEGMENT CHAR(1),RESPONSES INT,CHECKED SMALLDATETIME)
    INSERT INTO #TEST VALUES (1,’A’,0,’2009-05-01′)
    INSERT INTO #TEST VALUES (2,’B’,1,’2009-05-01′)
    INSERT INTO #TEST VALUES (3,’C’,0,’2009-05-01′)
    INSERT INTO #TEST VALUES (4,’A’,0,’2009-05-02′)
    INSERT INTO #TEST VALUES (5,’B’,2,’2009-05-02′)
    INSERT INTO #TEST VALUES (6,’C’,1,’2009-05-02′)
    INSERT INTO #TEST VALUES (7,’A’,1,’2009-05-03′)
    INSERT INTO #TEST VALUES (8,’B’,0,’2009-05-03′)
    INSERT INTO #TEST VALUES (9,’C’,2,’2009-05-03′)
    Write a query to summarise total RESPONSES for each SEGMENT and each CHECKED date, shown in following format:

    CHECKED A B C
    2009-05-01 0 1 0
    2009-05-02 0 2 1
    2009-05-03 1 0 2

    Do NOT hard-code segment names (i.e. “A”, “B”, “C”) into your solution, so the solution remains functional if more segments are added (e.g. “D”) or segments are renamed (e.g. “A”  “X”).

    Like

  47. Hi Pinal,

    I got question in my interview what he ask me like if he want to fetch 1 million records what type of query will need to write?

    Please give me this answer I am confused what should I answer for this question I asked other friends also but they don’t give me the write answer and I have hope I get it from you.

    Regards
    Khan

    Like

  48. Hi Rakhi,
    From where did you get this knowledge that “truncate can be rollbacked, but delete can’t”, so untrue?

    I’ve also heard people speaking contrary that “delete can be rollbacked, but truncate cannot”.

    But the real thing is that both can be rollbacked, when applied inside the transaction.

    ~Manoj

    Like

    • Adding more to my comments above:-

      “Without or Outside Transactions”, When DELETE/TRUNCATE is applied outside the transaction the changes are committed as soon as you execute sql statements. Thus nor DELETE neither TRUNCATE can be rollbacked. Thus in order to retrieve DELETED/TRUNCATED records you have to restore the last backup and run the transaction logs until the time DELETE/TRUNCATION happened.

      Like

  49. Hi Pinal,

    Thanks for putting this together. However I’m having a problem printing the PDF.

    It’s security protected (DRM) preventing it from being copied or printed.

    Thanks

    Like

  50. Hi Sir,
    I have done mcom i was working as mis reporting in excel , company got relocated i was in search of job someone suggested me do course in oracle DBA …I finished my course can u suggest me how shld i study… and prepare for interview and pls send me interview question to my mail id….pls i am physically challenge girl i am struggle to find job…

    Like

  51. HELLO SIR,
    HOW TO MAKE UNION OF “2 IF CONDITION” QUERIES?

    FOR EXAMPLE:

    IF(J=J)
    BEGIN
    SELECT ID,* FROM TABLE1
    END

    UNION

    IF(I=I)
    BEGIN
    SELECT ID,* FROM TABLE2
    END

    WITH GROUPBY ID

    Like

  52. Great work, good basic set of questions. It is great that I can download them. I can see preventing the changing of the document, but preventing the printing is a little overboard. if I can download, why cant I print?
    I use your questions a a reference point to what topics I really want to touch on during an interview. I do not always have a computer nearby.

    Like

  53. Hi
    After creating the cdc (table_CT) table that is genrated in system table cant Be Modified Means It Dosnt have Design option in sql server 2008
    Can Anybody Give Me Solution For This

    Like

  54. Hi,

    I am using SQL SERVER 2008 R2. In that i was created the job for taking the back up. It was working from the day of it is created. But from the last week it was not executed and also it shows error” Execution Failed.,See the Maintanence Plan and SQL Server Agent Job History logs for details”

    Please let me know why it happens? What is the solution to resolve this?

    Like

  55. Hi pinal,

    This is good for fresh people who just learn sql server and want to job as developer.
    But pinal , I am looking for some technical interview question with answer and some technical example as well.
    Because in some job people take interview with situation , action and result.
    I am looking that kind of interview question and answer.

    Like

  56. Hi Pinal,

    I’m having a very hard time in findig a way to enter my @FromDate and @ToDate into my procedure…can you please help and show me where do i need to enter these. Thank you so much in advance

    CREATE Procedure dbo.UHS_Rapidresponsedoc_RS_PR
    (@JobId int
    )
    as
    Begin
    Set NoCount on
    Declare @FromDate DATETIME
    Declare @ToDate DATETIME
    Declare @SubmittedReportGUID HVCIDdt
    DECLARE @InputParamTable TABLE
    (
    InternalValueGUID VARCHAR(30),
    ValueFrom VARCHAR(255),
    Name VARCHAR(30)

    )

    SET @SubmittedReportGUID = (SELECT
    SubmittedReportGUID
    FROM HVCRequestedReport
    WHERE JobID = @JobId)
    INSERT INTO @InputParamTable
    SELECT InternalValueGUID,
    ValueFrom,
    Name
    FROM HVCSubmittedParameter
    WHERE SubmittedReportGUID = @SubmittedReportGUID

    –Select * from @InputParamTable

    — Get the Report Date Intervals
    SELECT @FromDate =
    CASE
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND LEN(RP.ValueFrom) = 1 THEN
    CONVERT(varchar(11), GetDate())
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND PATINDEX(‘%+%’,RP.ValueFrom) 0 THEN
    DATEAdd(dd,convert(numeric,LTRIM(RIGHT(RP.ValueFrom,LEN(RP.ValueFrom)-PATINDEX(‘%+%’,RP.ValueFrom)))),CONVERT(datetime,CONVERT(varchar(11),GetDate())))
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND PATINDEX(‘%-%’,RP.ValueFrom) 0 THEN
    DateAdd(dd,-convert(numeric,(LTRIM(RIGHT(RP.ValueFrom, LEN(RP.ValueFrom)-PATINDEX(‘%-%’,RP.ValueFrom))))),CONVERT(datetime,CONVERT(varchar(11),GetDate())))
    ELSE CONVERT(datetime,RP.ValueFrom)
    END
    from @InputParamTable RP
    where RP.Name = ‘HVCFromDate’

    SET @FromDate = CAST((SELECT @FromDate
    ) + ‘ ‘ + (SELECT
    ISNULL(ValueFROM, ’00:00′)
    FROM @InputParamTable
    WHERE Name = ‘HVCFROMTime’) AS DATETIME)

    SELECT @ToDate =
    CASE
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND LEN(RP.ValueFrom) = 1 THEN
    CONVERT(varchar(11), GetDate())
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND PATINDEX(‘%+%’,RP.ValueFrom) 0 THEN
    DateAdd(dd,convert(numeric,LTRIM(RIGHT(RP.ValueFrom,LEN(RP.ValueFrom)-PATINDEX(‘%+%’,RP.ValueFrom)))),CONVERT(datetime,CONVERT(varchar(11),GetDate())))
    WHEN LEFT(RP.ValueFrom,1) = ‘t’ AND PATINDEX(‘%-%’,RP.ValueFrom) 0 THEN
    DateAdd(dd,-convert(numeric,(LTRIM(RIGHT(RP.ValueFrom, LEN(RP.ValueFrom)-PATINDEX(‘%-%’,RP.ValueFrom))))),CONVERT(datetime,CONVERT(varchar(11),GetDate())))
    ELSE CONVERT(datetime,RP.ValueFrom)

    END
    from @InputParamTable RP
    where RP.Name = ‘HVCToDate’

    SET @ToDate = CAST((SELECT @ToDate
    ) + ‘ ‘ + (SELECT
    ValueFROM
    FROM @InputParamTable
    WHERE Name = ‘HVCToTime’) AS DATETIME)

    select cv.providerdisplayname
    ,u.displayname as authoredprovider
    ,cv.clientdisplayname
    ,cv.idcode
    ,cv.visitidcode
    ,cd.createdwhen
    ,cd.documentname
    ,cd.AuthoredDtm
    ,cd.ArrivalDtm
    ,cp.DisplayName

    from cv3clientdocument cd
    inner join cv3clientvisit cv
    on cd.clientvisitguid = cv.guid
    inner join cv3user u
    on cd.authoredproviderguid = u.guid
    inner join cv3careprovider cp
    on cv.providerdisplayname = cp.displayname

    where cd.documentname not like ‘%Phone%’
    and cv.clientdisplayname not like ‘TEST%’
    and cd.documentname like ‘%Rapid%’
    and dateadd(dd, datediff(dd, 0, cd.ArrivalDtm ), 0) <= dateadd(dd, datediff(dd, 0, GETDATE()), 0)
    and cd.ArrivalDtm between @FromDate and @ToDate

    order by providerdisplayname,u.displayname,clientdisplayname

    Set NoCount off
    end

    Like

  57. sir,
    please tell me what are the main differences between ms access and sqlserver . when to use both different application?

    Like

  58. SELECT COUNT(SC.name) AS [Num of Columns]
    FROM sys.objects SO
    INNER JOIN sys.columns SC ON SC.object_id=SO.object_id
    WHERE type = ‘U’ AND SO.name = ‘Your Table_Name’

    Like

  59. sir plz solve my problem by query ,i.e. we need a query which select data from 2 tables –
    1- male(table1)
    2-female(table2)
    we need to get data which give alternative male and females value on by one.
    plz reply me.

    Like

  60. hello sir ,
    i have this problem while attaching the northwind test database .as show
    sir how i can slow this :
    thank you
    Regards sanaullah

    TITLE: Microsoft SQL Server Management Studio
    ——————————

    Attach database failed for Server ‘HP-PC\SQLEXPRESS’. (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

    ——————————
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ——————————

    Unable to open the physical file “C:\SQL Server 2000 Sample Databases\northwnd.mdf”. Operating system error 5: “5(Access is denied.)”. (Microsoft SQL Server, Error: 5120)

    Like

  61. hey,can u tell me that,we are using oldb namespace in case oracle connectivity,and this also possible in case of sql2008 also,so what is needs to implement using.system,data,sqlclient

    Like

  62. Hi all.this is just a great blog for sql. my question is this:
    1. Write a database script that would achieve the following:
    a. A DB Schema for a banking scenario that serves clients with both loans and savings. (use back page)

    b. Database stored procedures to insert and/or update the database tables. (use back page)
    how can i be able to do this

    Like

  63. I bought your book with paper back but Is there anyway I can get online version like a ebook to read the same on my phone and computer?

    Like

  64. Hai sir i have sql interview in this week in MNC . please give me any tips to study sql with in two days. pls help me sir.?

    Like

  65. Hi Mr Pinal,
    I have monitored your blog for quite some time and I am to oblige to say thank you for the good work. After several attempts I am still unable to download or find your books on MSSQL interview questions and answers. All the links are pointing in the locations and nothing is available to download. Can you please urgently help as I have a number of interview lined up and you are the only one who could truly help with the online (PDF) format of the interview questions and answers. Please reply to email.

    Many Thanks.

    Dee.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s