|
What are some tricky/interesting SQL questions you were asked in interviews?
|
|
|
|
|
|
Have a google for Sql Central, that site offers a "question of the day" which allows you to keep brushed up on your SQL Server and TSQL skills.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
qptopm wrote: What are some tricky/interesting SQL questions you were asked in interviews? Any detail from a book that is hardly used and therefore hard to remember. Most of these questions test your memory, not your understanding of how a database works.
Syntax is something you can look up quickly, but understanding never comes quick.
So, in your own words, what is a database, and when would I use one?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I'm getting the following errors while creating Filestream features in Sql server???
How to solve this error,Please help me???
ERROR:-
Msg 1969, Level 16, State 1, Line 1
Default FILESTREAM filegroup is not available in database 'HumanResource'.
Thanks...
|
|
|
|
|
That is because you have to create that group, it is not provided in your database by default. You must enable it,
FILESTREAM is not automatically enabled when you install or upgrade SQL Server. You must enable FILESTREAM by using SQL Server Configuration Manager and SQL Server Management Studio So do that, then you will be able to overcome this error. A documentation is given here too, FILESTREAM (SQL Server)[^].
Default FileStream filegroup is not available in database 'DatabaseName'[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
I am trying to execute the following update query:
update committees c1 set num_subcommittees =
case
when parent_committee is not null then -1
else (select count(*) from committees c2 where c2.parent_committee = c1.id)
end;
But instead getting mySql 1093 error. The table structure is like this:
CREATE TABLE `committees` (
`id` char(5) NOT NULL,
`parent_committee` char(5) DEFAULT NULL,
`name` char(200) DEFAULT NULL,
`chairman` char(40) DEFAULT NULL,
`ranking_member` char(40) DEFAULT NULL,
`num_subcommittees` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Please comment.
|
|
|
|
|
What is c1? Just use committees to update the table.
PHP Update Data in MySQL[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Your signature (Jassim) points to a site seems to be commercial... It is not really accepted here and can cause you to be banned for spamming...
Please remove it (or restore it to its previous value - your personal site)!
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I suspect it may be a site he created, or at least customised the template for!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Not enough info, how's your tables looking like?
|
|
|
|
|
In employees table:
- employee_number
- first_name
- last_name
In employee_job
- employee_number
- reporting_to (refers to employees->employee_number)
Technology News @ www.JassimRahma.com
|
|
|
|
|
I have table for instructor in university
This center give courses for programming language specialized to Microsoft product
this interface as following in image .
Simple File Sharing and Storage.[^]
SQL,c#,access,c++ courses that given by center
D(4),G(2),G(5),G(6),G(3) is sections
B.A ,I.S is departments of year in university
university consist from 4 year as following department as (INFORMATION SYSTEM (I.S) OR BUSINESS
ADMIN(B.A)OR TRADE ENGLISH (T.E)
I make ERD design as following :
This ERD for interface above
Can you tell me are this design is true for table above .
Simple File Sharing and Storage.[^]
|
|
|
|
|
DayNo => DayID in section is probably not a good idea.
Instead of using ID for every primary key use tablenameID, sql server will do a lot more work for you.
The structure looks ok.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The instructor table looks a bit odd to me, having both ID and InstructorID I would assume you meant InstructorID and InstructorName .
And as an addition to what Mycroft said, in a fully normalized database you always use the same name for an entity throughout the database. It's not just a good idea, it's a standard[^].
And just like Mycroft said, for a surrogate key, using <tablename> + "ID" is a good idea
|
|
|
|
|
What is the most complex SSIS package you have worked on? What did you learn from its implementation?
|
|
|
|
|
|
Actually SSIS is very much databases. It is a tool to transfer data from one data source to another.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
So we are now allowed to discuss resharper in the C# forum? It is a tool for C# after all
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Where would you suggest posting a discussion on SSIS? Is there a forum that you think is more appropriate than this one?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It's really a Lounge discussion subject, it's not a technical question.
|
|
|
|
|
Richard MacCutchan wrote: Lounge discussion subject, Could be, but I would bet if OP put it in the Lounge they'd get flamed by many.
Richard MacCutchan wrote: it's not a technical question. It's a good topic for discussions, which is what these forums are, discussions. However, I now notice that at the top of the discussions forum it says "how to ask a question."
Personally, I see QA as quick questions with direct answers and these discussion forums for discussions. I found it very appropriate.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
RyanDev wrote: if OP put it in the Lounge they'd get flamed by many. I don't see why, as it is not a programming question, more a general request for opinions and experiences. Plenty of similar discussions appear in the Lounge. I know these forums are titled "Discussions", but in reality they are for asking Technical Questions.
|
|
|
|
|
RyanDev wrote: Where would you suggest posting a discussion on SSIS? The Lounge.
RyanDev wrote: Is there a forum that you think is more appropriate than this one? Nope. Are you suggesting we need a new forum for SSIS or tools?
Just wondering how this would reflect on the C# forum, and no, I don't have a decent answer.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|