Jump to content

SQL test


4Vikram

Recommended Posts

45 minutes ago, LazyRohit said:

Chepptam kadu prove it antunna DBASthankyou@3$%

That  query works i already tested in oracle DB for all schemas.  Last condition customer id =100  loop lo rasukovali.  Direction istaru kani proc rasi pettanu nenu. Nadi naku rasukovadame chirak @LazyRohit h@)

Also, i am a java dev ..DBA's can give better optimized sol than me. Ltt for others.

Link to comment
Share on other sites

21 minutes ago, Katara said:

Mari 2&3 ?? khalilu purinchumu , anni prashnalaku samadhanalu raya valenu.

Second answer: Tested in oracle and it works

 

with numbers as (
   select level - 1 as id
   from dual
   connect by level <= (select max(id) + 2 from CLIENT)
), number_range as (
   select id
   from numbers 
   where id >= 0 -- this is the minimum
)
select nr.id as missing_sequence_value
from number_range nr
  left join CLIENT t on t.id = nr.id
where t.id is null
order by 1;

 

@4Vikram

 @Katara  : Badhakasturalito rayincharu ga :giggle:

3rd question ardham kaledu. *n$

  • Upvote 1
Link to comment
Share on other sites

andariki dhanyavadamulu @Amrita man nuvu chepinate try chesna man nenu kuda adhe working anukunta and updated also.. Trank you my fellow dbians. 

54 minutes ago, JollyBoy said:

TS unnava

Namaskaram Pedha Bala Murali Krishna Garu 

Link to comment
Share on other sites

4 hours ago, aakathaai said:

Select * from antha varake gurthundi baa

poi pandu ki votes esko po

4 hours ago, riashli said:

Off topic, how are you? Long time

Ltt

Hey Vaishu how are you vunty... Yes long time, DB boring aipoindi. Everything else is good, how are things with you? How are pillakayals?

Link to comment
Share on other sites

4 hours ago, 4Vikram said:

A database has > 1000 tables and there are about few hundred tables that have column called "CustomerID". Write a query to get the list of tables that have 1 more or rows for CustomerID = 100.(dynamic SQL)

2) Given a sequence A-01 to A-099 find the missing sequence(use dynamic or T-sql)(the numbers are in string how do ypu find it)

3)  how do you enforce rules by giving an example

 

any one?

Lyt 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...