Background Image

FORUM

조회 수 35002 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

제가 안드로이드에서 음식을 먹으면 그 음식 먹은 이력을 DB에 저장하려고 합니다.

 

안드로이드에서 System.currentTimeMillis(); 이라고 시스템의 시간을 가져오는게 있는데

 

이것 말고도 음식을 먹은 날짜와 시간을 지정해서 insert하려고 합니다.

 

그럼 sql문으로 insert 구문을 만들어서 넣어야 하는데

 

어떻게 만들어야 되는지 몰라서 이렇게 글 올립니다.

 

제가 해본 방법은 insert into test(testtime) values(to_timestamp("2009-01-03 12:33:33));

 

이런 식으로 했는데.. 어떻게 해야 할꺼요?

  • ?
    손승일 2011.06.01 03:50

    시스템 시간을 입력하는 방법은

    insert into test(testtime) values(systimestamp); 이런식으로 사용하면 되겠고,

    시간을 문자열로 입력 받은 경우에는, 입력 받은 값이 '2009-01-03 12:33:33'이면

    insert into test(testtime) values(to_timestamp('2009-01-03 12:33:33'); 이런식으로 사용하시면 됩니다.


  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views51
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4458
    read more
  3. UPDATE/INSERT를 한번에 하는 쿼리 질문드립니다.

    Date2009.02.17 Bykkckc Views28829
    Read More
  4. UPDATE 문 WHERE절에 IN

    Date2018.08.02 By큐피 Views663
    Read More
  5. UPDATE 다중 테이블 질문드립니다.

    Date2014.11.06 By유릉 Views7234
    Read More
  6. Trigger 이벤트 시점에 대해 질문드립니다.

    Date2019.10.29 Bycubridtest Views281
    Read More
  7. Transaction 확인시 sql_id, sql text가 나오질 않습니다.

    Date2015.12.29 By큐불리드 Views5580
    Read More
  8. TimeZone 관련 질문

    Date2022.06.03 Bysteve Views145
    Read More
  9. TimeStamp 관련 Select 오류 질문입니다

    Date2012.12.07 ByPsionic Views9372
    Read More
  10. Tibero -> Cubrid 마이그레이션 질문입니다.

    Date2017.03.30 By님장사드리브큐 Views8248
    Read More
  11. This object is in a zombie state 인 경우

    Date2011.06.01 By유겸아빠 Views12070
    Read More
  12. This object is in a zombie state 오류발생 도와주세요 ㅠㅠ

    Date2010.09.02 By유니콘 Views9004
    Read More
  13. This may take a long time depending on the amount of recovery works to do.?

    Date2013.02.07 Byddan0701 Views9351
    Read More
  14. The size of data received from server is different from the expected

    Date2011.01.21 By사자 Views11069
    Read More
  15. The column name is invalid. 에러메시지 좀...

    Date2009.07.02 By논픽션Lover Views20964
    Read More
  16. Table 및 column에 대한 description은 제공을 안하나요?

    Date2012.12.03 By용쌤 Views7854
    Read More
  17. Table 및 Index 가 사용하고 크기를 알수 있는 방법을 알려 주세요

    Date2016.03.19 By브이찾기 Views9624
    Read More
  18. Table 및 Column Comment 작성

    Date2013.02.27 By김상윤 Views11900
    Read More
  19. Table primary key잡는 중 중단 시키고, 서버 재시작하니 에러나고 시작이 안되네요.

    Date2011.06.28 By미스터투 Views7762
    Read More
  20. Table doesn't exist 에러..

    Date2016.12.05 By가라가라 Views10
    Read More
  21. Table Drop, truncate 시 시간이 너무 오래 걸립니다.

    Date2022.08.29 Bysteve Views754
    Read More
  22. Table Drop 후 데이터 볼륨 Size 에 변동이 없네요.

    Date2016.03.24 By브이찾기 Views9333
    Read More
Board Pagination Prev 1 ... 143 144 145 146 147 148 149 150 151 152 ... 200 Next
/ 200

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales